Closed TheSamsterZA closed 6 years ago
This also causes global commands like npm ls -g
to throw a "npm ERR! peer dep missing" error.
Same behaviour running npm update -g.
npm WARN @schematics/angular@0.1.10 requires a peer of @angular-devkit/schematics@0.0.40 but none is installed. You must install peer dependencies yourself. npm WARN @schematics/schematics@0.0.10 requires a peer of @angular-devkit/schematics@0.0.40 but none is installed. You must install peer dependencies yourself.
npm ERR! code E503 npm ERR! 503 All backends failed or unhealthy: @ngtools/webpack@https://registry.npmjs.org/@ngtools/webpack/-/webpack-1.9.0.tgz
I am also effected by this when running sudo npm install -g @angular/cli
/usr/lib
└─┬ @angular/cli@1.6.0
├─┬ @angular-devkit/build-optimizer@0.0.35
│ ├─┬ loader-utils@1.1.0
│ │ ├── big.js@3.2.0
│ │ └── emojis-list@2.1.0
│ ├── source-map@0.5.7
│ └── typescript@2.6.2
├─┬ UNMET PEER DEPENDENCY @angular-devkit/schematics@0.0.41
│ ├── @angular-devkit/core@0.0.22
│ ├── UNMET PEER DEPENDENCY @angular-devkit/schematics@0.0.40
│ ├── @schematics/schematics@0.0.10
│ └── minimist@1.2.0
looks like schematics is set as a peerDependency. @clydin was there a reason not to just make it a devDependency?
similar to issue #8787
@deebloo peerDepency is not the problem. I think the problem is by fixing a specific version.
@angular/cli depends on "@angular-devkit/schematics": "~0.0.40"
This will currently install 0.0.41.
@schematics/angular
and @schematics/schematics
has set
"peerDependencies": {
"@angular-devkit/schematics": "0.0.40"
},
They will not find 0.0.40 and should probably peer depend on the same version @angular/cli depends on.
Is there any workaround for that issue? Installing the dependencies manually doesn't seems to work either.
@GTrebaol workaround is just ignore the warning :smile: I should run without problems with 0.0.41. Problem is just that this warning is a little bit annoying but it does not break anything.
@moritz-h ohhhhhh. thanks makes sense!
This has been addressed via #8785
@Brocco
@angular/cli
dependencies. The warnings are created from the dependencies within @schematics/angular
and @schematics/schematics
Will the changes from @angular/cli
will be used within the @schematics
packages?
I saw the package.json here https://github.com/angular/devkit/blob/master/packages/schematics/angular/package.json with dependency version set to 0.0.0. Also saw the monorepo config: https://github.com/angular/devkit/blob/master/.monorepo.json and wondered where exactly the dependency versions are set.
@moritz-h As @mythz noted, this also causes 'npm ls' to throw an error. This caused our ci job to break, and we'll need to modify it now. Not the end of the world, but you seem to suggest it's a non-issue. It does take real-world dev time to track down the cause of these things.
@titocr I never suggested this is a non-issue. Is said the WORKAROUND is just ignore the warning. By not breaking I meant Angular(/CLI) works just fine when 0.0.41 is installed, even if npm complains about missing 0.0.40. (Actually I thought describing the workaround I found, could save others time by not need to investigate more details about where the warning comes from, while waiting for a fix. :smile: )
Noob question: @moritz-h Will a simple update be enough to remove the warning and prevent other things to break (as mentioned by @titocr ) or would one need to uninstall and reinstall? Thanks :)
@tfbkny it's still broken as there hasn't been an update after 1.6.0 with the fix yet. not sure when the next release is planned but it's annoying having 1.6.0 installed is still breaking scripts that run commands like npm ls
.
@Brocco Can/should this issue be re-opened? It's something of a breaking change for some people, and I didn't see another open issue that would address it. (directed at you since you closed it)
I get the same warning issue when installing angular cli globally...
when will expect to fixed the issue with new release.. ???
I am new to angular ... I dont know what am doing wrong
when I install angular cli local folder not global am getting the following error ... please help me out from this
npm WARN angular-cli No description npm WARN angular-cli No repository field. npm WARN angular-cli No README data npm WARN angular-cli No license field. npm WARN @schematics/angular@0.1.10 requires a peer of @angular-devkit/schematics@0.0.40 but none is installed. You must install peer dependencies yourself.
I have one more question ... what is the difference of Global and Local install of Angular cli
I have searched about it .. I understand that if we go with global install of angular cli we get some issue in future.. in local we dont get any issues in future.. Please suggest me which way to go .... with reason.,...
Thanks in advance.
Just do:
npm i --save @angular-devkit/schematics@0.0.40
version 0.0.41 still show warning, but 0.0.40 resolve it
@Danirv Don't install 0.0.40. ng new
is broken with 0.0.40, see this issue: https://github.com/angular/angular-cli/issues/8765 0.0.41 is a fix for that.
@moritz-h ok, so install 0.0.41 and ignore warning. Thanks!
Here's a workaround since 0.0.41 is apparently only needed in ng new (?):
For starting an angular project, do this first:
npm i --save @angular-devkit/schematics@0.0.41
But once you have it new'ed, then just change the version back to 0.0.40 to make npm happy again:
npm i --save @angular-devkit/schematics@0.0.40
I solved with:
npm install rxjs@5.5.5
npm i --save @angular-devkit/schematics@0.0.4
@Brocco and @clydin Please provide a long-term solution, that does not require the workarounds provided here.
As I mentioned in my original comment, seeing peer dependency warnings really puts off newcomers (I have experienced this first-hand as a trainer).
On the up-side, I've been using Angular 5.1.0 and CLI 1.6.0 and the development experience has been quite pleasant. Thanks for all of your hard work! 😃
As a newcomer, I second the "puts off newcomers" comment. I have all the shiney and new node, cli etc and I still cant get things to run as all the "look how awesome angular is" demos say the examples should run. It's like returning to DLL hell. Why would I want to chase dependencies and versions?
@Sangeethaself - Hey, welcome to the world of Angular!
So for starters, the warnings you are seeing are simply that: warnings. However, a little explanation of what you are seeing would probably help you.
The first four warnings is merely Angular-CLI itself complaining gently that you left some blanks open, and it is politely suggesting you could fill those in.
The final warning is what this error thread is about, and what some are discussing how/what/where/when to fix it, as it seems to be detrimental to some basic npm commands that need to be used in real-world environments.
You need a start point that is not on an error thread such as this. Since I do not know your personal budget, here is a FREE link that was literally updated THIS MONTH, and will give you some understanding of what is going on inside your Angular build: https://www.udemy.com/angular-tutorial-for-beginners/
Disclaimer: I have not and do not work for Udemy, but they have been a great source of knowledge for me personally.
Good luck with your coding adventures!
This is my first time working with CLI and I've been trying for hours to get this to work. I get these warnings every time I install cli using:
npm install -g @angular/cli
When I try
ng help
It tells me ng: command not found even though I installed it globally. Is it these dependencies that are preventing it from being installed globally or am I barking up the wrong tree?
@AreJay-Smith
When I try
ng help
Try ng --help
instead.
Following up on this: installing @angular/cli@1.6.3 resolves this specific issue for me. However:
Still an issue with version 1.6.4.
npm ERR! peer dep missing: @angular-devkit/schematics@0.0.43, required by @schematics/angular@0.1.12
Why is this issue still not reopened as it definitely is not solved!
Same for me :(. I guess it was solved, no?
I checked and @schematics/angular@0.1.12
requires exactly @angular-devkit/schematics@0.0.43
, while we use a newer version on Angular CLI (0.0.45
). This is a bug in our release scripts I believe.
this sucks: can someone help in here: npm WARN @schematics/schematics@0.0.13 requires a peer of @angular-devkit/schematics@0.0.46 but none is installed. You must install peer dependencies yourself.
Having the same issue... Any solution for this?
I have also just received these warnings after updating to 1.6.4 via npm.
I have confirmed @MorganMarshall findings. I tried to manually install the dependencies:
npm install --save @angular-devkit/schematics@0.0.48
But received:
`-- @angular-devkit/schematics@0.0.48
`-- UNMET PEER DEPENDENCY @angular-devkit/schematics@0.0.46
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\package.json'
npm WARN @schematics/schematics@0.0.13 requires a peer of @angular-devkit/schematics@0.0.46 but none was installed.
Trying to install 0.0.46 version:
npm install --save @angular-devkit/schematics@0.0.46
Results in:
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\\package.json'
C:\Users\
`-- @angular-devkit/schematics@0.0.46
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\package.json'
NOTE: I was able to setup and run projects without a problem, given these are optional dependencies.
same problem
Having the same issue here.
same for me
I also am getting this error. :( I had latest version of node, downgraded to 6.90. same error over and over:
C:\code\udemy>ng new test module.js:471 throw err; ^
Error: Cannot find module '@angular-devkit/core'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.
Same error when upgrading to ng cli from 1.6.3 to 1.6.4. And now ng build fails :-(
> ng build --prod
module.js:540
throw err;
^
Error: Cannot find module '@angular-devkit/core'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Fred\Pimentour\spa\node_modules\@angular\cli\node_modules\@angular-devkit\schematics\src\tree\virtual.js:10:16)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
I am also seeing this error today and is preventing any ng
command from working:
npm install warnings:
npm WARN @angular-devkit/schematics@0.0.49 requires a peer of @angular-devkit/core@0.0.26 but none was installed.
npm WARN @schematics/angular@0.1.14 requires a peer of @angular-devkit/core@0.0.26 but none was installed.
error from any ng
command:
> ng
module.js:487
throw err;
^
Error: Cannot find module '@angular-devkit/core'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (<...>/node_modules/@angular-devkit/schematics/src/tree/virtual.js:10:16)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
Installed versions:
Fix seems to be running npm install @angular-devkit/schematics@0.0.45 --no-save
Combined with this bug https://github.com/angular/angular/issues/21621 this has not been a good day for the Angular CLI :(
In an interval of 2 hours since last build... SURPRISE!! 😢
@benc-uk For me the problem was rather with @angular-devkit/core
.
Your solution to manually install this dependency can work on a local computer, but it is not sufficient for continuous integration server.
For the moment, for me, the workaround was to install the package as dev dependency.
Can you share the exact npm command(s) you used?
I haven’t been able to get a work around working.
Thanks
On Thu, Jan 18, 2018 at 1:51 PM Frédéric Barrière notifications@github.com wrote:
@benc-uk https://github.com/benc-uk For me the problem was rather with . Your solution to manually install this dependency can work on a local computer, but it is not sufficient for continuous integration server. For the moment, for me, the workaround was to install the package as dev dependency.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/8767#issuecomment-358793376, or mute the thread https://github.com/notifications/unsubscribe-auth/ALo3tmKrp6SeWFXlfYvWF_RPDyjTSkjuks5tL7zzgaJpZM4Q40Bx .
-- Thanks,
Aaron
npm install --save-dev @angular-devkit/core@0.0.26
Thanks! I just ran that update and it worked. I then updated to version to @angular-devkit/core@0.0.28
Now I'm on cli 1.6.4, node 8.9.4 angular 5.2.0. ng new, ng serve, ng test and ng e2e all seem to be working fine.
Thanks again
Aaron
On Thu, Jan 18, 2018 at 2:12 PM, Frédéric Barrière <notifications@github.com
wrote:
npm install --save-dev @angular-devkit/core@0.0.26
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/8767#issuecomment-358798945, or mute the thread https://github.com/notifications/unsubscribe-auth/ALo3tjfJW-nfAzS6_PPgwsPpfJgu13RYks5tL8HKgaJpZM4Q40Bx .
-- Thanks,
Aaron
For me the 'update' didn't work, so I uninstalled and installed it with the version tag. See the step by step:
Check outdated packages:
npm outdated -g --depth=0.
Uninstall
npm uninstall -g @angular-devkit/core
Clean
npm cache verify; npm cache clean --force
Install with version tag
npm install -g @angular-devkit/core@0.0.28
Or
npm install -g @angular-devkit/core@latest
Versions
Repro steps
ng new myapp --routing
cd myapp
npm list --depth=0
Observed behavior
Step 1 warns with:
Step 3 errors with:
Desired behavior
No peer dependency warnings/errors from npm by using the Angular CLI.
Mention any other details that might be useful (optional)
I get the same warning in step 1 from npm when I install the Angular CLI globally with:
This is detrimental to the first-run experience for new users. Sure, we could ignore the warning, but I'd much prefer it if installing and using the Angular CLI did not throw up things that might cause issues down the line.