Reputation: 8307
My package json is:
"devDependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/http": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/router": "^3.0.0-alpha.8",
"autoprefixer": "^6.3.3",
"rxjs": "5.0.0-beta.6",
"selenium-standalone": "^5.1.0",
"style-loader": "^0.13.0",
"stylelint": "^6.3.2",
"stylelint-webpack-plugin": "^0.2.0",
"to-string-loader": "^1.1.3",
"ts-helpers": "^1.1.1",
"tslint": "^3.3.0",
"tslint-loader": "^2.1.0",
"typescript": "^1.8.10",
"typings": "^1.0.4",
"webpack": "^1.13.0",
"webpack-dev-server": "^1.14.1",
"webpack-hot-middleware": "^2.9.1",
"webpack-split-by-path": "0.1.0",
"zone.js": "0.6.12"
}
When I do npm install I get the following error:
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- @angular/[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 @angular/[email protected] requires a peer of @angular/core@^2.0.0-rc.5 but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/compiler@^2.0.0-rc.5 but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/common@^2.0.0-rc.5 but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/platform-browser@^2.0.0-rc.5 but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/platform-browser-dynamic@^2.0.0-rc.5 but none was installed.
If I go to the core library and do npm list
I get the following:
node_modules/@angular/core$ npm list
@angular/[email protected]
+-- UNMET PEER DEPENDENCY [email protected]
`-- UNMET PEER DEPENDENCY zone.js@^0.6.6
npm ERR! peer dep missing: [email protected], required by @angular/[email protected]
npm ERR! peer dep missing: zone.js@^0.6.6, required by @angular/[email protected]
However [email protected] and zone.js@^0.6.6 have already been installed as per the package.json. Why is npm not linking these libraries to the required libraries?
Upvotes: 3
Views: 875
Reputation: 2107
Are you sure all those are devDependencies, not dependencies which need to be deployed with the application (like angular for example)? If you have those angular modules in dependencies as well, then the peers rxjs and zonejs will need to be in dependencies.
Upvotes: 0