ember-test-helpers icon indicating copy to clipboard operation
ember-test-helpers copied to clipboard

peerDeps don't support Ember beta with npm

Open simonihmig opened this issue 2 years ago • 3 comments

When I do ember new with the master branch of ember-cli (which refers to a beta version of ember-source) and npm 8.5, I am getting this:

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/ember-source
npm ERR!   dev ember-source@"~4.6.0-beta.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer ember-source@">=3.8.0" from @ember/[email protected]
npm ERR! node_modules/@ember/test-helpers
npm ERR!   dev @ember/test-helpers@"^2.8.1" 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 /Users/simonihmig/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/simonihmig/.npm/_logs/2022-07-22T18_14_08_017Z-debug-0.log

Seems npm is not considering the beta version a match for >=3.8.0!? :thinking:

It's not a problem with --yarn.

simonihmig avatar Jul 22 '22 18:07 simonihmig

Seeing this as well with my addon CIs. Seems to be introduced in #1211.

Using 2.7.0 version of this project fixes things for me.

mikkopaderes avatar Jul 24 '22 09:07 mikkopaderes

Watching this Issue.

I'm working in a new addon, and the following scenarios are broken due to this issue:

  • ember-release
  • ember-beta
  • ember-canary

rogeraraujo90 avatar Dec 06 '22 11:12 rogeraraujo90

@simonihmig @mikkopaderes @rogeraraujo90 I just noticed this doing a bit of issue triage. I think the changes we're landing as part of 3.0.0 should fix it, but we can also do a back port fix as 2.9.2; I think it just needs the engines field to have ^3.8.0 || ^4.0.0. Here's how it looks on master, which is about to go out as 3.0.0 (tomorrow):

https://github.com/emberjs/ember-test-helpers/blob/da1d078c8a960eaa912e0a090858891251957734/package.json#L42-L44

If one of you opens a PR targeting the release-2-x branch with that, I'll happily release it!

chriskrycho avatar Dec 16 '22 03:12 chriskrycho