chasekap
chasekap

Reputation: 31

Unmet Peer Dependency causes

Been trying to set up my Angular2 app in Webstorm, and came across a problem with npm install, where it fails because '[email protected]' has an unmet peer dependency. I've tried to install it manually with

      sudo npm install [email protected]

but it doesn't work. This is the terminal output when trying to npm install:

      sudo npm install 
      [email protected] /home/chase/angular2-starter
      ├── [email protected]  extraneous
      └── UNMET PEER DEPENDENCY [email protected]

      npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
      npm WARN notsup Not compatible with your operating system or  architecture: [email protected]
      npm WARN [email protected] requires a peer of [email protected] but none was installed.
      npm WARN [email protected] No description
      npm WARN [email protected] No repository field.

This is my Package.json file:

    {
      "name": "angular2-starter",
      "version": "1.0.0",
      "scripts": {
      "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
      "lite": "lite-server",
      "postinstall": "typings install",
      "tsc": "tsc",
      "tsc:w": "tsc -w",
      "typings": "typings"
   },
      "license": "ISC",
      "dependencies": {
      "@angular/common": "2.0.0-rc.5",
      "@angular/compiler": "2.0.0-rc.5",
      "@angular/core": "2.0.0-rc.5",
      "@angular/forms": "0.3.0",
      "@angular/http": "2.0.0-rc.5",
      "@angular/platform-browser": "2.0.0-rc.5",
      "@angular/platform-browser-dynamic": "2.0.0-rc.5",
      "@angular/router": "3.0.0-rc.1",
      "@angular/router-deprecated": "2.0.0-rc.2",
      "@angular/upgrade": "2.0.0-rc.5",
      "angular2": "^2.0.0-beta.17",
      "angular2-in-memory-web-api": "0.0.15",
      "bootstrap": "^3.3.6",
      "core-js": "^2.4.0",
      "es6-shim": "^0.35.1",
      "reflect-metadata": "^0.1.2",
      "rxjs": "^5.0.0-beta.6",
      "systemjs": "0.19.27",
      "zone.js": "^0.6.15"
       },
      "devDependencies": {
      "concurrently": "^2.0.0",
      "lite-server": "^2.2.0",
      "typescript": "^1.8.10",
      "typings": "^1.0.4"
     } 
     }

Any Ideas? Thanks

Upvotes: 2

Views: 3072

Answers (1)

Steven Scott
Steven Scott

Reputation: 11270

The npm WARN [email protected] requires a peer of [email protected] but none was installed. indicates that you need the proper version and you do not have it installed. You can change this by correcting the package.json to not have the caret (^) before the version.

  "reflect-metadata": "0.1.2",
  "rxjs": "5.0.0-beta.6",

Removing the caret will install the specific version. This will however prevent updated versions of being installed.

Upvotes: 2

Related Questions