运行npm install -g generator-webapp
会在npm-debug.log
文件的末尾显示:
18875 error peerinvalid The package yo does not satisfy its siblings' peerDependencies requirements!
18875 error peerinvalid Peer generator-mocha@0.1.6 wants yo@>=1.0.0
18875 error peerinvalid Peer generator-webapp@0.5.0 wants yo@>=1.2.0
18876 error System Windows_NT 6.1.7601
18877 error command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "generator-webapp"
18878 error cwd c:\Users\junto\Documents\My Web Sites\kita
18879 error node -v v0.10.17
18880 error npm -v 1.3.8
18881 error code EPEERINVALID
运行npm install -g yo
会导致类似的错误:
19472 error peerinvalid The package yo does not satisfy its siblings' peerDependencies requirements!
19472 error peerinvalid Peer generator-mocha@0.1.6 wants yo@>=1.0.0
19472 error peerinvalid Peer generator-webapp@0.5.0 wants yo@>=1.2.0
19473 error System Windows_NT 6.1.7601
19474 error command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo"
19475 error cwd c:\Users\junto\Documents\My Web Sites\kita
19476 error node -v v0.10.17
19477 error npm -v 1.3.8
19478 error code EPEERINVALID
19479 verbose exit [ 1, true ]
我该如何解决这个问题?
答案 0 :(得分:2)
找到答案:
您需要安装yo 1.2.0
npm install -g yo@1.2.0
我也必须更新npm:
npm install -g npm@1.4.3