Closed simonihmig closed 3 years ago
I think this is due to a wrong webpack version, see https://github.com/embroider-build/embroider/pull/791 and https://github.com/embroider-build/embroider/pull/792
Those are fixed on master but not yet released, I need to do a patch release soon.
confirm: I got this error yesterday in an addon and made it go away by manually adding webpack @v5 to my package.json
Those are fixed on master but not yet released, I need to do a patch release soon.
I could refer to the master branch of test-setup as an interim solution, but wonder if there is anything left blocking that release? (other than your personal time of course) Anything I/we can do?
Ran into the same thing with @embroider/test-setup
(0.40.0)! Turns out that webpack@4
is coming from ember-auto-import, btw.
I'm experiencing this issue as well. I tried yarn add webpack -D
and now my tests seem to just hang and throw errors like not ok 1 Chrome 90.0 - [undefined ms] - Global error: Uncaught ReferenceError: Ember is not defined at http://localhost:7357/assets/vendor.js, line 1027
The main thing blocking release is that changes in (I think) ember-cli-babel have left a large swath of embroider's test suite falling.
Seeing the same issue with ember-page-title. Tried with auto-import v2 and get the same result as well. But an older version of auto-import might have been used since some deps don't use v2.
When using resolutions and setting auto-import to v2, I get this:
Cannot find module 'webpack'
Require stack:
- /Users/iradchenko/maintained/ember-page-title/node_modules/@embroider/webpack/src/ember-webpack.js
- /Users/iradchenko/maintained/ember-page-title/node_modules/@embroider/test-setup/src/index.js
- /Users/iradchenko/maintained/ember-page-title/ember-cli-build.js
- /Users/iradchenko/maintained/ember-page-title/node_modules/ember-cli/lib/utilities/find-build-file.js
- /Users/iradchenko/maintained/ember-page-title/node_modules/ember-cli/lib/models/builder.js
- /Users/iradchenko/maintained/ember-page-title/node_modules/ember-cli/lib/tasks/build-watch.js
- /Users/iradchenko/maintained/ember-page-title/node_modules/ember-cli/lib/utilities/require-as-hash.js
- /Users/iradchenko/maintained/ember-page-title/node_modules/ember-cli/lib/cli/index.js
- /Users/iradchenko/maintained/ember-page-title/node_modules/ember-cli/bin/ember
Stack Trace and Error Report: /var/folders/g5/dvq_p0010s5b2ys8bwd7czdr0000gp/T/error.dump.511adc0fe6cab062cdaf1a7054ca8ab9.log
Looks like #792 will fix this. Any ideas when this will be released?
0.41.0 fixes it for me with auto-import v1 in ember-page-title
Confirm. Fixed in 0.41.0!
Anyone know why tests would be hanging for embroider with errors like this?
not ok 1 Chrome 90.0 - [undefined ms] - Global error: Uncaught ReferenceError: Ember is not defined at http://localhost:7357/assets/vendor.js, line 1027
---
browser log: |
{"type":"error","text":"Uncaught ReferenceError: Ember is not defined at http://localhost:7357/assets/vendor.js, line 1027\n","testContext":{}}
...
not ok 2 Chrome 90.0 - [undefined ms] - Global error: Uncaught Error: Could not find module `velocity` imported from `(require)` at http://localhost:7357/assets/vendor.js, line 256
They run for hours and never time out, so I cancel them, and then I see these types of errors. See this PR https://github.com/shipshapecode/ember-shepherd/pull/779
@rwwagner90 sounds like you need to use skipBabel setting for velocity maybe? https://github.com/embroider-build/embroider/issues/677#issuecomment-813118275
@knownasilya I tried that in https://github.com/shipshapecode/ember-shepherd/pull/779 and it still seems to hang with the same error. @ef4 any ideas here?
After re-enabling embroider test scenarios in
ember-bootstrap
, I am getting this error in CI, also when adding the embroider dependencies locally to this PR (which could serve as a reproduction).It has worked before, so this seems like a regression.
I debugged this a bit in node:
the error is thrown in
@embroider/webpack
herein the previous step of the call stack, the
match
forassets/dummy.js
seems pretty broken:Same when looking at
stats.entrypoints
map forassets/dummy.js
(same forassets/tests.js
):Haven't investigated any further. Any idea?