Angular2:未满足PEER DEPENDENCY [email protected]

问题描述:

有谁告诉我为什么NPM是让我这个消息时,我执行npm installAngular2:未满足PEER DEPENDENCY [email protected]

+-- @angular/[email protected] 
+-- @angular/[email protected] 
+-- @angular/[email protected] 
+-- @angular/[email protected] 
+-- @types/[email protected] 
+-- UNMET PEER DEPENDENCY [email protected] 
| `-- [email protected] 
`-- [email protected] 

什么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试图解决[email protected],而不是[email protected]

这里是一个工作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" 
    } 
} 

只是删除^