emberjs/ember-test-helpers

peerDeps don't support Ember beta with npm

simonihmig opened this issue · 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: foo@0.0.0
npm ERR! Found: ember-source@4.6.0-beta.2
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/test-helpers@2.8.1
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!? 🤔

It's not a problem with --yarn.

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.

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

@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):

"peerDependencies": {
"ember-source": "^3.28.0 || ^4.0.0"
},

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