I updated ionic globally to v4 beta.3 a week ago and created a new project. How can I update my project to beta.5? I ran
npm install -g ionic@latest as well as npm install --save ionic@latest but when I opened my package.json in my project it doesn’t look like anything changed. I’m sure this is a stupid question but I’m lost and hoping someone can point me in the right direction when it comes to updating my project the same way as creating a new one with ionic start.
conz: it wipe all libs and will recreate a new lock file, so in the meantime you could receive other dependencies update
pro: it makes every dependencies clean again
I use this method these days with beta because then I’m sure I’m up-to-date and won’t discover later some weird issue with a dependencies, but well like I said, there are some conz
Alternative: use ncu (https://github.com/tjunnone/npm-check-updates). In any case actually, I love ncu, it really helps me each week to follow updates or at least to see which of the dependencies I used moved
important note if you want to upgrade to beta.5 from beta.3, note that you should also check if you are using typescript v2.9.2 and angular >= 6.1, if not they should be upgraded too
I use two other methods to update Ionic (Angular) that may help:
Angular Cli
Use Angular CLI to update Angular dependencies.
Juste type $ ng update and follow instructions
Ionic Conference App
Check Ionic Conference App Demo package.json https://github.com/ionic-team/ionic-conference-app/blob/master/package.json
This App is updated regurarly by the Ionic team in order to follow releases.
Copy dependencies versions and paste it un your project package.json.
Then run $ npm install, if something fails during update (which generally does), just delete /node_modules folder and run $ npm install again.