How to update to 2.0.0-beta.4?

I’ve found the instructions here: http://ionicframework.com/docs/v2/resources/using-npm/

But it bombs out if I try to run it since dependencies aren’t fulfilled:

bash-3.2$ npm outdated
Package                         Current        Wanted         Latest  Location
angular2                   2.0.0-beta.6  2.0.0-beta.6  2.0.0-beta.14  angular2
awesome-typescript-loader       0.15.10       0.15.10    0.17.0-rc.5  awesome-typescript-loader
es6-promise                       3.0.2         3.0.2          3.1.2  es6-promise
es6-shim                        0.33.13       0.33.13         0.35.0  es6-shim
ionic-angular              2.0.0-beta.3  2.0.0-beta.3   2.0.0-beta.4  ionic-angular
reflect-metadata                  0.1.2         0.1.2          0.1.3  reflect-metadata
rxjs                       5.0.0-beta.0  5.0.0-beta.0   5.0.0-beta.5  rxjs
typescript                        1.8.7         1.8.7          1.8.9  typescript
zone.js                          0.5.14        0.5.14         0.6.10  zone.js

bash-3.2$ npm install ionic-angular@latest
npm WARN package.json portalshop@ No repository field.
npm WARN package.json portalshop@ No README data
npm WARN package.json portalshop@ No license field.
npm WARN peerDependencies The peer dependency angular2@^2.0.0-beta.13 included from ionic-angular will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm ERR! Darwin 15.3.0
npm ERR! argv "/Users/kim/.nvm/versions/node/v4.4.2/bin/node" "/Users/kim/.nvm/versions/node/v4.4.2/bin/npm" "install" "ionic-angular@latest"
npm ERR! node v4.4.2
npm ERR! npm  v2.15.0
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package angular2@2.0.0-beta.6 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer ionic-angular@2.0.0-beta.4 wants angular2@^2.0.0-beta.13

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/kim/ionic/ionic-projects/PortalShop/npm-debug.log

Any clues?

Hi there,

it’s very simple. The error message describes exactly which version of a package it is required to install newer version of Ionic:

npm ERR! peerinvalid The package angular2@2.0.0-beta.6 does not satisfy its siblings’ peerDependencies requirements!
npm ERR! peerinvalid Peer ionic-angular@2.0.0-beta.4 wants angular2@^2.0.0-beta.13

To fix this, you have to edit package.json file and change under dependencies from “angular2”: “2.0.0-beta.6” to “angular2”: “2.0.0-beta.13”. You will get another messages like this. But I think you got the idea and how to fix the problem.

I hope I could help.

Best

Also, don’t go by the output of “npm outdated”, as that is based upon what is already installed and not what you want to install. Just change the version numbers one at a time between running “npm install” until you no longer receive errors. Before starting, always backup your packages.json if you do not have it under version control.

If you’re using an older version of the framework there are actually a few additional steps aside from updating the npm packages (i.e. package.json file) - I wrote a short guide on how to upgrade your project to beta.4 (check out the linked post for detailed instructions):

Thanks guys!

What I ended up doing was using ionic-cli to create a new project and move my existing app folder to the new project, add plugins and platforms again.