例如,当我安装Angular2时:
npm install --save angular2
temp@1.0.0 /Users/doug/Projects/dougludlow/temp
├── angular2@2.0.0-beta.3
├── UNMET PEER DEPENDENCY es6-promise@^3.0.2
├── UNMET PEER DEPENDENCY es6-shim@^0.33.3
├── UNMET PEER DEPENDENCY reflect-metadata@0.1.2
├── UNMET PEER DEPENDENCY rxjs@5.0.0-beta.0
└── UNMET PEER DEPENDENCY zone.js@0.5.11
npm WARN angular2@2.0.0-beta.3 requires a peer of es6-promise@^3.0.2 but none was installed.
npm WARN angular2@2.0.0-beta.3 requires a peer of es6-shim@^0.33.3 but none was installed.
npm WARN angular2@2.0.0-beta.3 requires a peer of reflect-metadata@0.1.2 but none was installed.
npm WARN angular2@2.0.0-beta.3 requires a peer of rxjs@5.0.0-beta.0 but none was installed.
npm WARN angular2@2.0.0-beta.3 requires a peer of zone.js@0.5.11 but none was installed.
是否可以传递给npm的魔术标志也将安装对等项依赖关系?我找不到一个...手动复制并粘贴对等项依赖关系并确保我具有正确的版本很繁琐。
换句话说,我宁愿不必这样做:
npm install --save angular2@2.0.0-beta.3 es6-promise@^3.0.2 es6-shim@^0.33.3 reflect-metadata@0.1.2 rxjs@5.0.0-beta.0 zone.js@0.5.11
有什么更好的方法?
angular2@2.0.0-beta.3
require es6-promise@^3.0.2
)。但是,我想知道是否有一个命令/标志会自动安装对等项依赖关系。
npm -v
=>3.5.3