ayeo ayeo - 5 months ago 131
Node.js Question

Angular 2 rc3 - unresolved dependencies

Im using packages.json from official Angular2 site, the quick start. Yesterday it was working fine, today npm cant resolve dependecies. I get error:

npm ERR! peerinvalid The package @angular/core@2.0.0-rc.3 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/common@2.0.0-rc.3 wants @angular/core@2.0.0-rc.3
npm ERR! peerinvalid Peer @angular/compiler@2.0.0-rc.3 wants @angular/core@2.0.0-rc.3
npm ERR! peerinvalid Peer @angular/forms@0.1.1 wants @angular/core@2.0.0-rc.3
npm ERR! peerinvalid Peer @angular/http@2.0.0-rc.3 wants @angular/core@2.0.0-rc.3
npm ERR! peerinvalid Peer @angular/platform-browser@2.0.0-rc.3 wants @angular/core@2.0.0-rc.3
npm ERR! peerinvalid Peer @angular/platform-browser-dynamic@2.0.0-rc.3 wants @angular/core@2.0.0-rc.3
npm ERR! peerinvalid Peer @angular/router@3.0.0-alpha.7 wants @angular/core@^2.0.0-rc.2
npm ERR! peerinvalid Peer @angular/router-deprecated@2.0.0-rc.2 wants @angular/core@^2.0.0-rc
npm ERR! peerinvalid Peer @angular/upgrade@2.0.0-rc.3 wants @angular/core@2.0.0-rc.3
npm ERR! peerinvalid Peer angular2-in-memory-web-api@0.0.12 wants @angular/core@2.0.0-rc.2


My npm-debug: http://q.i-systems.pl/file/3dd29e55.zip

Answer

This happens when you update some packages and leave some hanging, that's what angular just did in RC.3.


So instead of fixing who needs what,

  • I deleted node_modules
  • copied package.json from QuickStart, added my extras
  • ran npm install

npm is happy again.