-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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 breaks on Webpack 5 #23290
Comments
Should be fixed by updating babel-runtime to 7.12.0 or newer, as noted here: https://babeljs.io/blog/2020/10/15/7.12.0 |
It doesn't look like this bug report has enough info for one of us to reproduce it. Please provide a CodeSandbox (https://material-ui.com/r/issue-template), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve |
@eps1lon Afaik codesandbox does not support custom webpack configs. I'll create a quick repo showcasing the issue. |
That's fine. That is a saved reply that mentions that codesandbox is not necessary. GitHub repo works just as well. |
I'm gonna close the issue. After creating the example where it oddly worked just fine, i came to the conclusion that it had to be the yarn.lock file, as all else was identical. I deleted it, reinstalled my deps, and profit. |
If I recall correctly, some versions of babel/runtime are just not compatible with webpack 5. We're probably bumping our version to the latest in v5 but for v4 I rather not mess with babel/runtime. |
Still not working for me today, having the same issues as described. Does that mean we will have to wait for V5 to work with the latest babel version?? |
@anthonyferreol Try deleting your lock file and reinstall your projects dependencies. It did the trick for me, for some reason. |
I tried the |
@EliasJorgensen I tried before posting, it is not working Until the version of Babel runtime is not bumped in material-ui, I'm doomed with my up to date tech stack 😥 |
@anthonyferreol Sorry to hear that. It worked for me. |
This worked for me Thanks! |
have this problem too. @material-ui/core 5.0.0-alpha.17 ERROR in ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js Module not found: Error: Can't resolve './arrayWithoutHoles' in '/usr/src/app/node_modules/@babel/runtime/helpers/esm' tried to delete lock file and install packages - the same errors |
I'm getting the same error after upgrading to Webpack 5. The fix is to upgrade @babel/runtime used by MUI to 7.12+ #23290 (comment). To do this, simply reinstall MUI |
Thanks, this worked for me! Although I had to delete the .next folder and node_modules also |
just for those coming back here because of the same problem. I'm also using I fixed it by setting the tested it from: steps: add this to :
then exec |
Build breaks on Webpack 5 due to babel-runtime imports not following ESM Strict mode requirements.
Current Behavior 😯
Build fails with the following errors:
Expected Behavior 🤔
Build finishes without errors.
Steps to Reproduce 🕹
Context 🔦
Migration from Webpack 4 -> 5, which imposes stricter requirements for package modules.
Your Environment 🌎
The text was updated successfully, but these errors were encountered: