假设我有一个带有以下package.json
文件的空项目:
{
"name": "EmptyNG2",
"version": "1.0.0",
"description": "Empty Description",
"repository": {},
"dependencies": {
"angular2": "^2.0.0-beta.17"
},
"author": "me",
"license": "ISC"
}
现在我想安装 Angular2 及其所有依赖项(无论它需要什么)并使用:
npm i -SDOEdd
i for install
-S save the installed packages into package.json
D save Dependencies
O save Optional Dependencies
E use exactly the given version Angular -> 2.0.0-beta.17
dd show me what you do (short version for --verbose)
NPM 识别对等依赖项但仍然不安装它们:
npm WARN angular2@2.0.0-beta.17 requires a peer of es6-shim@^0.35.0 but none was installed.
npm WARN angular2@2.0.0-beta.17 requires a peer of reflect-metadata@0.1.2 but none was installed.
npm WARN angular2@2.0.0-beta.17 requires a peer of rxjs@5.0.0-beta.6 but none was installed.
npm WARN angular2@2.0.0-beta.17 requires a peer of zone.js@^0.6.12 but none was installed.
是否有额外的密钥?
编辑:我知道,这不是一个角度问题:angular2 只是一个有趣/现代的例子来展示实际问题。