Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm ERR! Could not resolve dependency: npm ERR! peer jasmine-core@">=3.8" from [email protected] #21326

Closed
14 tasks
weirdyang opened this issue Jul 10, 2021 · 4 comments

Comments

@weirdyang
Copy link

🐞 Bug report

Command (mark with an x)

  • [ x] new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc
| Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/jasmine-core
npm ERR!   dev jasmine-core@"~3.7.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jasmine-core@">=3.8" from [email protected]
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR!   dev karma-jasmine-html-reporter@"^1.5.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\ads\AppData\Local\npm-cache\eresolve-report.txt for a full report.

I get the following error when I try to create a new project. I've updated ng cli after reading this issue, but I'm still getting the error.

@weirdyang
Copy link
Author

D:\personal\angular>ng v

 _                      _                 ____ _     ___
/ \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

/ △ \ | '_ \ / | | | | |/ _ | '__| | | | | | |
/ ___ | | | | (
| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/

Angular CLI: 12.1.1
Node: 14.15.4
Package Manager: npm 7.19.1
OS: win32 x64

Angular:
...

Package Version

@angular-devkit/architect 0.1201.1 (cli-only)
@angular-devkit/core 12.1.1 (cli-only)
@angular-devkit/schematics 12.1.1 (cli-only)
@schematics/angular 12.1.1 (cli-only)

@alan-agius4
Copy link
Collaborator

Looks like the issue is caused by a karma-jasmine-html-reporter release, were they dropped support for jasmine-core version 3.7 in a minor version.

Removing the lower bounds of a peerDependency should be considered a breaking changed due to NPM 7 new peer dependencies behaviour.

As a workaround you can do the following;

ng new --skip-install
Open package.json and bump jasmine-core to `~3.8.0`
npm i

@weirdyang
Copy link
Author

Thank you.

filipesilva pushed a commit that referenced this issue Jul 12, 2021
…-reporter`

This is not the first time, that this package caused a breaking change in a minor version, were it drops support for older `jasmine-core` versions.

Related to #21326
filipesilva pushed a commit that referenced this issue Jul 12, 2021
…-reporter`

This is not the first time, that this package caused a breaking change in a minor version, were it drops support for older `jasmine-core` versions.

Related to #21326

(cherry picked from commit 0907b69)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants