npm ERR: peerinvalid The package generator-karma does not satisfy its siblings peerDependencies requirements

我只是一个虾纸丫 提交于 2019-11-29 01:49:46

The new version of yeoman installs bower and grunt for you (so you don't need those on your npm line anymore). So, just to be safe remove what you have:

npm remove -g yo bower grunt-cli

And then try this install

npm install -g yo

Some people still experience the problem you're having though, here's the issue and in comments are a number of different things to try if the above doesn't resolve your issue: https://github.com/yeoman/generator-angular/issues/220

ap_snitch

https://stackoverflow.com/a/24084524/3692197

This helped me.

I uninstalled all the dependent generators which are throwing error

npm uninstall -g generator-[generator-name]

Update Yo

npm update -g yo

Install the required generator

npm install -g generator-[generator-name]

This one helped me:

npm uninstall -g generator-karma && npm install -g generator-angular

Before updating or re-installing yo, you must remove all generators (in my case generator-angular)

npm remove -g generator-angular

Then you can update yeoman

npm update -g yo

And smile :)

I had to do "sudo rm -rf /usr/local/lib/node_modules/generator-karma" then npm update -g yo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!