angular-cli: install of angular-cli results in unmeet peer dependencies. Installing a peer does not resolve
Please provide us with the following information:
-
OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) OSX 10.11.6
-
Versions. Please run
ng --version
. If there’s nothing outputted, please run in a Terminal:node --version
and paste the result here: ng --version Could not start watchman; falling back to NodeWatcher for file system events. Visit http://ember-cli.com/user-guide/#watchman for more info. angular-cli: 1.0.0-beta.11-webpack.8 node: 6.5.0 os: darwin x64 -
Repro steps. Was this an app that wasn’t created using the CLI? What change did you do on your code? etc. Just ran npm install -g angular-cli@webpack
-
The log given by the failure. Normally this include a stack trace and some more information. see below
-
Mention any other details that might be useful. I also tried clearing the npm cache but the results were the same.
larsb-concourse:~ larsb$ npm install -g angular-cli@webpack
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash-node@2.4.1: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
/usr/local/bin/ng -> /usr/local/lib/node_modules/angular-cli/bin/ng
/usr/local/lib
└─┬ angular-cli@1.0.0-beta.11-webpack.8
├── UNMET PEER DEPENDENCY @angular/platform-server@^2.0.0-rc.5
├── UNMET PEER DEPENDENCY tslint@^3.0.0
├── UNMET PEER DEPENDENCY typescript@2.0.2
├── UNMET PEER DEPENDENCY webpack@2.1.0-beta.21
└── UNMET PEER DEPENDENCY zone.js@^0.6.17
npm WARN tslint-loader@2.1.5 requires a peer of tslint@^3.0.0 but none was installed.
npm WARN string-replace-loader@1.0.3 requires a peer of webpack@1.x.x || 2.x.x but none was installed.
npm WARN @angular/compiler-cli@0.5.0 requires a peer of typescript@^1.9.0-dev but none was installed.
npm WARN @angular/compiler-cli@0.5.0 requires a peer of @angular/platform-server@^2.0.0-rc.5 but none was installed.
npm WARN @angular/tsc-wrapped@0.2.2 requires a peer of typescript@^1.9.0-dev but none was installed.
npm WARN @angular/core@2.0.0-rc.6 requires a peer of zone.js@^0.6.17 but none was installed.
npm WARN tsickle@0.1.6 requires a peer of typescript@^1.8.0 || ^1.9.0-dev but none was installed.
larsb-concourse:~ larsb$ npm install -g zone.js@^0.6.17
/usr/local/lib
└── zone.js@0.6.17
larsb-concourse:~ larsb$ npm install -g angular-cli@webpack
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash-node@2.4.1: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
/usr/local/bin/ng -> /usr/local/lib/node_modules/angular-cli/bin/ng
/usr/local/lib
└─┬ angular-cli@1.0.0-beta.11-webpack.8
├── UNMET PEER DEPENDENCY @angular/platform-server@^2.0.0-rc.5
├── UNMET PEER DEPENDENCY tslint@^3.0.0
├── UNMET PEER DEPENDENCY typescript@2.0.2
├── UNMET PEER DEPENDENCY webpack@2.1.0-beta.21
└── UNMET PEER DEPENDENCY zone.js@^0.6.17
npm WARN string-replace-loader@1.0.3 requires a peer of webpack@1.x.x || 2.x.x but none was installed.
npm WARN tslint-loader@2.1.5 requires a peer of tslint@^3.0.0 but none was installed.
npm WARN @angular/compiler-cli@0.5.0 requires a peer of typescript@^1.9.0-dev but none was installed.
npm WARN @angular/compiler-cli@0.5.0 requires a peer of @angular/platform-server@^2.0.0-rc.5 but none was installed.
npm WARN @angular/tsc-wrapped@0.2.2 requires a peer of typescript@^1.9.0-dev but none was installed.
npm WARN @angular/core@2.0.0-rc.6 requires a peer of zone.js@^0.6.17 but none was installed.
npm WARN tsickle@0.1.6 requires a peer of typescript@^1.8.0 || ^1.9.0-dev but none was installed.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 16
- Comments: 66 (1 by maintainers)
I started over again with the angualrfire2 developer guide. And with help from @davideast got further than last time. But at the end I still get this…
to add to @M4ttsson 's solution the terminal console on with app works! is outputing:
I completed the following steps which seems to have fixed the problem for me. OSX 10.11.6 node v6.6.0 npm v3.10.3
npm uninstall -g angular-cli
npm cache clean
npm install -g node-gyp
npm install -g node-pre-gyp
npm install -g angular-cli
These 5 steps successfully installed
angular-cli@1.0.0-beta.15
These “solutions” are sketchy and shouldn’t be required. Please fix this for real.
Getting the same issue, this needs to be resolved quick 😐
I had the same issue. The following solved the problem on my side:
"typescript": "1.8.0"
npm install
"typescript": "2.0.0"
npm install
againAll working fine now. Hope this helps
I had similar unmet dependency errors, during installation of the cli, and also the
errors when running ng serve. which made me think there was something wrong with the typescript install, so tried a bunch of things and got it to work on: angular-cli: 1.0.0-beta.11-webpack.8, node: 6.5.0, os: win32 x64
tl;dr, this fixed it for me:
not sure if this is needed, but then I changed “typescript”: “^2.0.0” to “typescript”: “2.0.0” in package.json line 41
yes to overwrite
also, before the above I did the requirements stuff from, https://github.com/nodejs/node-gyp, (under installation, windows, option 2, in my case). which I’m pretty sure was needed to get node-zopfli to build successfully, first I had python 3.5 set as default in npm, which made it fail.
cmd log: cmd_log_angular-cli_webpack_8.txt
I’ve helped a group of developers through this and other problems the last few days. Almost 100% were able to get up and running by rigorously getting a fresh install:
These challenges are coming from the complex, broad Node ecosystem - Angular-CLI is (via its transitive dependencies) a very large Node program, and exposed to many, many failure modes. CLI source code itself doesn’t create most (or any?) of these install challenges, so it is quite tough for CLI to fix them.
I’m currently learning more about the following - it might offer both a way to increase robustness, and speed up installation.
https://docs.npmjs.com/files/package.json#bundleddependencies
I take it back… back to ground zero…
I installed the very latest version of node from the nodejs.org website, and
npm --version
returns 3.10.3. So I went and didnpm install npm -g
, now I have npm 3.10.7.Now
npm install angular-cli --save-dev
gives only warnings, but still when I donode_modules/.bin/ng
, I get the same error as before:Notice I still do have the older ng installed globally, but I don’t want to replace it with the new one, because that would force me to immediately migrate all my existing projects at once… assuming the latest version of angular-cli does work when installed globally.
It worked for me with a similar solution to @M4ttsson.
ng init
, skipped everythingI think there is some kind of cross platform weirdness going on. I was having these problems on a fresh clone of a repo. The original development was done on an Mac and this clone is on my Windows 10 PC.
I think the node_modules folder just needs to get dumped and reinstalled.
Same issue here. Cannot find any solution.
+1
I managed to get it to work using part of @estyles solution. First I uninstalled angular-cli. And I have the latest version of typescript installed globally.
At this stage I got unmet peer dependency error. Install them one by one or add them to the package.json and run npm install again.
+-- UNMET PEER DEPENDENCY @angular/platform-server@^2.0.0-rc.5
+-- UNMET PEER DEPENDENCY node-sass@^3.4.2
+-- UNMET PEER DEPENDENCY tslint@^3.0.0
+-- UNMET PEER DEPENDENCY typescript@2.0.0
-- UNMET PEER DEPENDENCY webpack@2.1.0-beta.21 extraneous
9 ng init. (overwrite everything). 10 Add above peer dependencies again since they got removed. 11 Delete whole node_modules folder and everything in it. 12 npm install 13 ng serve
Then it worked for me. You should be able to change some parts to get a new project up and running too. Some steps may be superfluous but I got it to work so I’m not experimenting more. Deleting node_modules folder after ng init was essential for my project.
Hope this helps.
+1