当我执行npm install
时,有人能告诉我为什么npm会收到此消息:
+-- @angular/common@2.2.4
+-- @angular/core@2.2.4
+-- @angular/http@2.2.4
+-- @angular/platform-browser@2.2.4
+-- @types/core-js@0.9.35
+-- UNMET PEER DEPENDENCY rxjs@5.0.0-rc.4
| `-- symbol-observable@1.0.4
`-- zone.js@0.6.26
什么' UNMET PEER DEPENDENCY
?
packages.json
的内容是:
{
...
"dependencies": {
"@angular/common": "^2.2.4",
"@angular/core": "^2.2.4",
"@angular/http": "^2.2.4",
"@angular/platform-browser": "^2.2.4",
"rxjs": "^5.0.0-beta.12",
"zone.js": "^0.6.21"
}
}
为什么npm
尝试解决rxjs@5.0.0-rc.4
而不是rxjs@5.0.0-beta.12
?
答案 0 :(得分:2)
这是一个有效的package.json
:
{
...
"dependencies": {
"@angular/common": "^2.2.4",
"@angular/core": "^2.2.4",
"@angular/http": "^2.2.4",
"@angular/platform-browser": "^2.2.4",
"rxjs": "5.0.0-beta.12",
"zone.js": "^0.6.21"
}
}
只需删除^