Angular CLI 1.6.x Peer Dependency Warning from npm
See original GitHub issueVersions
Angular CLI: 1.6.0
Node: 7.10.0
OS: win32 x64
Angular: 5.1.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.6.0
@angular-devkit/build-optimizer: 0.0.35
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.41
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.0
@schematics/angular: 0.1.10
@schematics/schematics: 0.0.10
typescript: 2.4.2
webpack: 3.10.0
Repro steps
ng new myapp --routing
cd myapp
npm list --depth=0
Observed behavior
Step 1 warns with:
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.
Step 3 errors with:
+-- @angular/animations@5.1.0
+-- @angular/cli@1.6.0
+-- @angular/common@5.1.0
+-- @angular/compiler@5.1.0
+-- @angular/compiler-cli@5.1.0
+-- @angular/core@5.1.0
+-- @angular/forms@5.1.0
+-- @angular/http@5.1.0
+-- @angular/language-service@5.1.0
+-- @angular/platform-browser@5.1.0
+-- @angular/platform-browser-dynamic@5.1.0
+-- @angular/router@5.1.0
+-- @types/jasmine@2.5.54
+-- @types/jasminewd2@2.0.3
+-- @types/node@6.0.92
+-- codelyzer@4.0.1
+-- core-js@2.5.1
+-- jasmine-core@2.6.4
+-- jasmine-spec-reporter@4.1.1
+-- karma@1.7.1
+-- karma-chrome-launcher@2.1.1
+-- karma-cli@1.0.1
+-- karma-coverage-istanbul-reporter@1.3.0
+-- karma-jasmine@1.1.1
+-- karma-jasmine-html-reporter@0.2.2
+-- protractor@5.1.2
+-- rxjs@5.5.5
+-- ts-node@3.2.2
+-- tslint@5.7.0
+-- typescript@2.4.2
`-- zone.js@0.8.18
npm ERR! peer dep missing: @angular-devkit/schematics@0.0.40, required by @schematics/angular@0.1.10
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:
npm i -g @angular/cli
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.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:46
- Comments:52 (10 by maintainers)
Top Results From Across the Web
How do I fix the npm UNMET PEER DEPENDENCY warning?
UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more modules specified in the package.
Read more >package.json - npm Docs
When a user installs your package, npm will emit warnings if packages specified in peerDependencies are not already installed. The peerDependenciesMeta field ...
Read more >you must install peer dependencies yourself Code Example
npm WARN codelyzer@6.0.1 requires a peer of tslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. typescript by devops ......
Read more >You must install peer dependencies warning during npm install
My company's code base runs on node 14.x. Whenever I try to install and build, I get these peer dependency warnings.
Read more >the installed angular cli version is older than the latest stable ...
The Angular CLI requires a minimum Node.js version of either v14.15, or v16.10. ... Peer dependency warnings when installing dependencies means that those ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yesterday we put out several releases for minor version that should address this:
1.4.10
,1.5.6
,1.6.5
and1.7.0-beta.1
. We also locked down the devkit dependencies on1.4.10
and1.5.6
so this does not happen again if you choose to stay on older versions.Updating to the latest version within the minor you’re using should fix this issue. For example, if you are on
1.5.1
, updating to1.5.6
should fix it.I’d like to remind everyone that you only have reproducible installs if you use a lockfile. Both NPM v5+ and Yarn support lockfiles. If your CI works one day but not the next and you did not change your code or
package.json
, it is likely because one of your dependencies had a bad release and you did not have a lockfile.It is your responsibility as a library consumer to use lockfiles. No one wants to do a release with bugs but it sometimes happens, and the best we can do is to fix it as fast as possible with a new release. When you have a couple of thousand total dependencies it is only a matter of time until one of them has a bad release.
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!