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

Build error: "don't know how to insertURL /assets/undefined" #798

Closed
simonihmig opened this issue Apr 30, 2021 · 12 comments
Closed

Build error: "don't know how to insertURL /assets/undefined" #798

simonihmig opened this issue Apr 30, 2021 · 12 comments

Comments

@simonihmig
Copy link
Collaborator

simonihmig commented Apr 30, 2021

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:

  1. the error is thrown in @embroider/webpack here

  2. in the previous step of the call stack, the match for assets/dummy.js seems pretty broken:
    Bildschirmfoto 2021-04-30 um 19 28 58

  3. Same when looking at stats.entrypoints map for assets/dummy.js (same for assets/tests.js):
    Bildschirmfoto 2021-04-30 um 19 32 03

Haven't investigated any further. Any idea?

@ef4
Copy link
Contributor

ef4 commented Apr 30, 2021

I think this is due to a wrong webpack version, see #791 and #792

Those are fixed on master but not yet released, I need to do a patch release soon.

@NullVoxPopuli
Copy link
Collaborator

confirm: I got this error yesterday in an addon and made it go away by manually adding webpack @v5 to my package.json

@simonihmig
Copy link
Collaborator Author

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?

@mehulkar
Copy link

Ran into the same thing with @embroider/test-setup (0.40.0)! Turns out that webpack@4 is coming from ember-auto-import, btw.

@RobbieTheWagner
Copy link

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

@ef4
Copy link
Contributor

ef4 commented May 14, 2021

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.

@knownasilya
Copy link
Contributor

knownasilya commented May 20, 2021

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?

@knownasilya
Copy link
Contributor

0.41.0 fixes it for me with auto-import v1 in ember-page-title

@simonihmig
Copy link
Collaborator Author

Confirm. Fixed in 0.41.0!

@RobbieTheWagner
Copy link

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 RobbieTheWagner/ember-shepherd#779

@knownasilya
Copy link
Contributor

knownasilya commented May 21, 2021

@rwwagner90 sounds like you need to use skipBabel setting for velocity maybe? #677 (comment)

@RobbieTheWagner
Copy link

@knownasilya I tried that in RobbieTheWagner/ember-shepherd#779 and it still seems to hang with the same error. @ef4 any ideas here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants