简体   繁体   中英

npm install -g generator-angular gives error (requires a peer of)

Learning Node and trying to install generator-angular

running npm install -g generator-angular

WARN EPEERINVALID generator-angular@0.14.0 requires a peer of generator-karma@>=0.9.0 but none was installed.

What does it means and how can I install it?

You should try to install all the components in the same time.

npm install -g grunt-cli bower yo generator-karma generator-angular

worked for me.

就我而言,解决方案是在一行中安装

npm install -g yo generator-karma generator-angular 

npm@3 no longer install peerDependencies automatically. This warning is shown as a result of this change.

If you are not running the tests you do not have to install karma .
If you are, npm install karma>=0.9.0 manually.

https://docs.npmjs.com/files/package.json#peerdependencies

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM