emberjs / ember-test-helpers

Test-framework-agnostic helpers for testing Ember.js applications
Apache License 2.0
188 stars 254 forks source link

Module not found: Error: `@ember/test-helpers` is trying to import from `@ember/-internals` but that is not one of its explicit dependencies #1481

Closed mkszepp closed 3 weeks ago

mkszepp commented 3 weeks ago

After upgrade to @ember/test-helpers to v4 the addon embroider-safe test is running into this error (see CI error)

Module not found: Error: @ember/test-helpers is trying to import from @ember/-internals but that is not one of its explicit dependencies

The only usecase is here: https://github.com/emberjs/ember-test-helpers/blob/41e0bb17825664597fadc0b615655c104226cfd5/addon/src/-internal/render-settled.ts#L9-L15

It looks like the macroCondition brings a false instead of true...

Maybe the problem is that test-helpers doesn't have ember-source as peerDependency?

The test-app is using ember-source v5.10. I can also reproduce it with v5.11

NullVoxPopuli commented 3 weeks ago

Thanks for reporting! I have a hunch that this is why I originally did an dependenciesMeta*injected.

Hopefully, if I re-add that, tests will fail

CvX commented 3 weeks ago

We had the same @ember/-internals error in Discourse (failed CI run) and now on 4.0.1 there's a @ember/renderer error instead 😅 (CI)

NullVoxPopuli commented 3 weeks ago

hm, @ember/renderer is from ember-source, so I feel like this could be an embroider bug :thinking: I'll try a repro tomorrow

mkszepp commented 3 weeks ago

Confirm.. i have the same error in EBD (with clean install) see CI

Turbo87 commented 3 weeks ago

same in crates.io (see https://github.com/rust-lang/crates.io/pull/9302)