3

I have cleaned my run npm remove ... and npm -g remove ... to remove everything related to npm. But I still got below error when I try npm install generator-webapp

npm ERR! peerinvalid The package yo does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants yo@>=1.0.0
npm ERR! peerinvalid Peer [email protected] wants yo@>=1.2.0

Any idea how to fix it? I searched for a while, and the only suggestion is to clean my npm packages.

2 Answers 2

4

I just ran up against the same problem and after some random kicks and punches, was able to get things working.

Step 1: Remove Yeoman

$ npm uninstall -g yo

Step 2: Clear NPM Cache

$ npm cache clean

Step 3: Upgrade NPM to latest version

$ npm install -g npm

Step 4: Install Yeoman

$ npm install -g yo

After doing this, things kicked into life. I saw the exact same error so I am confident this will work for you. Also, not sure but step 2 may be optional.

Hope this helps, let me know if you hit any other snags!

1

The problem is not in the npm packages. It is the npm itself. The npm in Ubuntu repository is too old. Use this guide to install the latest one, and everything works.

3
  • How does this piece of advice differ from that offered by BlakePetersen? (3 - upgrade NPM to latest version)? Oct 31, 2014 at 23:38
  • I tried. I cannot upgrade npm with npm...can you?
    – David S.
    Nov 1, 2014 at 3:17
  • @davidshen84 Be sure you are using "install" instead of "update" to update npm to the latest version. Attempting to update it like a standard package doesn't work. npmjs.org/doc/misc/npm-faq.html#how-do-i-update-npm- Nov 3, 2014 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .