安装 angular2 时出现 npm UNMET PEER DEPENDENCY 警告

npm UNMET PEER DEPENDENCY warnings when installing angular2

我在安装 angular2 时收到奇怪的 未满足的对等依赖关系 警告。我已经尝试缓存清理并安装了所有依赖项,如下所示,但仍然收到警告:

有人可以帮忙吗?

你能像下面一样重写你的 package.json 吗?重写 package.json 解决了它:

npm WARN angular2@2.0.0-beta.17 requires a peer of es6-shim@^0.35.0 but none was installed.

package.json: "es6-shim": "^0.35.0",

npm WARN angular2@2.0.0-beta.17 requires a peer of reflect-metadata@0.1.2

package.json: "reflect-metadata": "0.1.2",

npm WARN angular2@2.0.0-beta.17 requires a peer of rxjs@5.0.0beta.6

package.json: "rxjs": "5.0.0beta.6",

npm WARN angular2@2.0.0-beta.17 requires a peer of zone.js@0.6.12

package.json: "zone.js": "0.6.12",

Delete node_modules directory

npm install