我正在使用节点v4.4.3并在我的Angular项目中尝试npm install
但是在安装后会抛出一些错误:
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package @angular/common@2.2.4 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/forms@2.2.4 wants @angular/common@2.2.4
npm ERR! peerinvalid Peer @angular/platform-browser@2.2.4 wants @angular/common@2.2.4
npm ERR! peerinvalid Peer @angular/platform-browser-dynamic@2.2.4 wants @angular/common@2.2.4
npm ERR! peerinvalid Peer @angular/router@3.2.4 wants @angular/common@2.2.4
npm ERR! peerinvalid Peer ng2-bootstrap@1.1.16 wants @angular/common@^2.0.0
npm ERR! peerinvalid Peer ng2-ckeditor@1.1.9 wants @angular/common@^2.1.0 || ^4.0.0
npm ERR! peerinvalid Peer ng2-file-upload@1.2.1 wants @angular/common@^2.3.1 || >=4.0.0
npm ERR! peerinvalid Peer ng2-sharebuttons@1.1.5 wants @angular/common@^2.0.0
npm ERR! Please include the following file with any support request:
npm ERR! /Users/affanfaisal/workspace/konmari/konmari-api-2/konmari-web-app-client/npm-debug.log
我该如何解决这个问题?
答案 0 :(得分:1)
在angular Doc他们明确提到了
验证您至少运行节点6.9.x和npm 3.x.x 在终端/控制台窗口中运行节点-v和npm -v。年长 版本会产生错误,但新版本可以正常使用。
所以你需要 npm> 3.X 和节点> 6.X.X 强>