Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
313 views
in Technique[技术] by (71.8m points)

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

When I run

 npm install -g yo grunt-cli bower

at my terminal I get the following dependency error:

npm ERR! peerinvalid The package generator-karma does not satisfy its siblings'
peerDependencies requirements!
npm ERR! peerinvalid Peer generator-angular@0.5.0 wants generator-karma@~0.5.0
npm ERR! System Darwin 12.4.1
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "yo" "grunt-cli" "bower"
npm ERR! cwd /Users/ryanwieghard/code/angin/indie-cinema-tools
npm ERR! node -v v0.10.20
npm ERR! npm -v 1.3.11
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/ryanwieghard/code/angin/indie-cinema-tools/npm-debug.log
npm ERR! not ok code 0

I am not sure how to resolve this. Is there a way to manually install generator-karma@~0.5.0 ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...