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

Better error message with webpack v4 installed #791

Merged
merged 1 commit into from
Apr 27, 2021

Conversation

bendemboski
Copy link
Contributor

Detect when a too-old version of webpack is installed up front and provide an explicit error message, rather than a more cryptic failure later.

For google-ability, the current error that occurs with webpack v4 installed instead of v5 is:

broccoliBuilderErrorStack: Error: don't know how to insertURL /assets/undefined
    at Placeholder.insertURL (/home/bent/Projekter/Loadbalancer/node_modules/@embroider/webpack/src/html-placeholder.js:43:15)
    at HTMLEntrypoint.render (/home/bent/Projekter/Loadbalancer/node_modules/@embroider/webpack/src/html-entrypoint.js:101:41)
    at Webpack.writeFiles (/home/bent/Projekter/Loadbalancer/node_modules/@embroider/webpack/src/ember-webpack.js:299:105)
  - code: [undefined]
  - codeFrame: don't know how to insertURL /assets/undefined
  - errorMessage: don't know how to insertURL /assets/undefined
        at PackagerRunner (@embroider/webpack)

Detect when a too-old version of webpack is installed upfront, rather than producing a more cryptic error later in the build process when some incompatible data is encountered.
@ef4 ef4 merged commit ffa2d39 into embroider-build:master Apr 27, 2021
@ef4
Copy link
Contributor

ef4 commented Apr 27, 2021

Thanks!

@rwjblue rwjblue added the bug Something isn't working label May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants