$npm i angular2で下記のエラーが出て困ったときは

npm WARN [email protected] requires a peer of [email protected]^3.0.2 but none was installed.
npm WARN [email protected] requires a peer of [email protected]^0.35.0 but none was installed.
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN [email protected] requires a peer of [email protected]^0.6.4 but none was installed.

package.jsonに下記の内容を追記。dependenciesでなくdevDependenciesに記述する必要があった。
"dependencies": {
"angular2": "2.0.0-beta.11"
},
"devDependencies": {
"live-server": "^0.9.2",
"es6-promise":"^3.0.2",
"es6-shim":"^0.35.0",
"reflect-metadata":"0.1.2",
"rxjs":"5.0.0-beta.2",
"zone.js":"^0.6.4"
}

package.jsonを修正して
$ npm i
としたらangular2のインストールは上手く行った。

Leave a Reply

Your email address will not be published. Required fields are marked *