【发布时间】:2017-03-18 12:08:32
【问题描述】:
当我通过npm ls 命令获取我的包裹列表时,我看到了这个警报:
npm 错误! peer dep 缺失:zone.js@^0.7.2,@angular/core@2.4.10 需要
这是我的package.json 依赖项:
"dependencies": {
"@angular/common": "2.4.x",
"@angular/compiler": "2.4.x",
"@angular/core": "2.4.x",
"@angular/forms": "2.4.x",
"@angular/http": "2.4.x",
"@angular/platform-browser": "2.4.x",
"@angular/platform-browser-dynamic": "2.4.x",
"@angular/router": "3.4.x",
"angular-in-memory-web-api": "0.3.x",
"systemjs": "0.20.x",
"core-js": "2.4.x",
"rxjs": "5.2.x",
"zone.js": "0.8.x"
}
注意最后一行"zone.js": "0.8.x"。
我检查了semantic-versioning guide。
条件^0.7.2 适用于我的"zone.js": "0.8.x"(现在我有0.8.4 版本的zone.js)。 我说的对吗?
这是MyProjectFolder\node_modules\@angular\core\package.json中的peerDependencies部分:
"peerDependencies": {
"rxjs": "^5.0.1",
"zone.js": "^0.7.2"
}
rxjs 没有任何警报,但我的package.json 中有5.2.0 版本。
我的 Windows 10 机器中的应用程序版本:
node -v
v6.9.2
npm -v
4.4.1
【问题讨论】: