I have node v4.4.0 and npm v2.14.20 installed on OS X (El Capitan).
I'm following steps described on 5 Min Quickstart - ts page that's available on Angular 2 official site.
However I come across the following error when I execute npm install
.
npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants es6-shim@^0.33.3
In order to be able to isolate the problem this is what I have done.
npm init
with empty values to generate an empty package.json
.I have added the following dependencies to my package.json.
"dependencies": {
"angular2": "2.0.0-beta.9",
"es6-shim": "^0.35.0"
}
I executed npm install
and observe the same error above.
This is the peerDependencies
inside package.json
of /node_modules/angular2
"peerDependencies": {
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15"
}
Given the ^0.33.3
version requirement for es6-shim peer dependency, shouldn't es6-shim be installed fine with version 0.35.0
? What is the problem that I fail to see?
I had the same problem, except that I have Windows10. I solved it by upgrading my Node.js from 4.4.1 LTS to 5.9.0 Stable.
Try this version of package.json
, that should do it
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"typings": "typings",
"postinstall": "typings install"
},
"license": "ISC",
"dependencies": {
"angular2": "2.0.0-beta.9",
"systemjs": "0.19.24",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.1.0",
"typescript": "^1.8.7",
"typings":"^0.7.5"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With