Npm ERR! peerinvalid during npm installation of Angular 2 Quickstart installation

I have node v4.4.0 and npm v2.14.20 installed on OS X (El Capitan).

I follow the steps described on page 5 of Min Quickstart - ts , which is available on the official Angular 2 website.

However, when npm installI run, I encounter the following error.

npm ERR! peerinvalid The package es6-shim@0.35.0 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer angular2@2.0.0-beta.9 wants es6-shim@^0.33.3

To be able to isolate the problem, this is what I did.

  • Create an empty project folder.
  • In an empty folder, I performed npm initwith empty values โ€‹โ€‹to generate an empty one 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 installand observed the same error above.

It's peerDependenciesinsidepackage.json /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"
}

^0.33.3 es6-shim, es6-shim 0.35.0? , ?

+4
3

, , Windows10. , Node.js 4.4.1 LTS 5.9.0. .

+7

package.json,

{
  "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"
  }
}
+3

package.json

{
  "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.10",
    "systemjs": "0.19.24",
    "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"
  },
  "devDependencies": {
    "concurrently": "^2.0.0",
    "lite-server": "^2.1.0",
    "typescript": "^1.8.7",
    "typings":"^0.7.5",
    "grunt"                : "^0.4.5",
    "grunt-contrib-clean"  : "^1.0.0",
    "grunt-contrib-concat" : "^1.0.0",
    "grunt-contrib-sass"   : "^0.9.2",
    "grunt-contrib-watch"  : "^0.6.1"
  }
}

node_modules/angular2/package.json

  "peerDependencies": {
    "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"
  },

, , , .

, (https://github.com/angular/quickstart/blob/master/package.json) .

: :

  • "angular2": "2.0.0-beta.10"
  • "es6-shim": "^ 0.35.0",
  • "zone.js": "^ 0.6.4"
0
source

All Articles