npm install导致Angular2应用程序中的peerinvalid错误

时间:2016-12-09 21:45:41

标签: angular npm

直到今天我尝试安装新软件包时,我都没有遇到任何问题。现在我甚至不能做一个

npm install

我收到以下错误

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program      Files (
x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package rxjs does not satisfy its siblings'peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/core@2.1.2 wants rxjs@5.0.0-beta.12
npm ERR! peerinvalid Peer @angular/http@2.1.2 wants rxjs@5.0.0-beta.12
npm ERR! peerinvalid Peer @angular/router@3.1.2 wants rxjs@5.0.0-beta.12
npm ERR! peerinvalid Peer angular-in-memory-web-api@0.1.17 wants rxjs@5.0.0-rc.4

以下是我的依赖

 "dependencies": {
"@angular/common": "~2.1.0",
"@angular/compiler": "~2.1.0",
"@angular/core": "~2.1.0",
"@angular/forms": "~2.1.0",
"@angular/http": "~2.1.0",
"@angular/platform-browser": "~2.1.0",
"@angular/platform-browser-dynamic": "~2.1.0",
"@angular/router": "~3.1.0",
"@angular/upgrade": "~2.1.0",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.10",
"angular-in-memory-web-api": "~0.1.5",
"angular2-select": "^1.0.0-alpha.12",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.39",
"zone.js": "^0.6.25"

},

我尝试删除node_modules文件夹并获取相同的内容。 有什么想法吗?

1 个答案:

答案 0 :(得分:1)

看起来像你的内存中的web-api包需要 rxjs@5.0.0-rc.4没有 rxjs@5.0.0-beta.12您可能需要卸载该软件包