假设我有一个空项目,其中包含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只是一个有趣/现代的例子来展示行动中的问题。