Webpack polyfill error
See original GitHub issue- Laravel Mix Version: laravel-mix@6.0.18
- Node Version: v14.15.4
- NPM Version: 6.14.10
- OS: macOS Big Sur
Description:
When i’m running yarn run development
i get a whole bunch of errors. mainly the following error
“webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.”
See screenshot:
What i’ve tried already:
- added
mix.options({ legacyNodePolyfills: true });
to my webpack.mix.js file - added
mix.webpackConfig({ resolve: { fallback: { process: require("node-libs-browser").process, buffer: require("node-libs-browser").buffer, }, }, })
unfortunately non of them worked…
Someone knows what to do about this?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:18
Top Results From Across the Web
Webpack 5 Receiving a Polyfill Error?!?! My JavaScript React ...
Run npm install node-polyfill-webpack-plugin in your terminal`. go to your webpack.config.js and paste this:
Read more >How to polyfill node core modules in webpack 5 - Alchemy
The main issue with create-react-app and the polyfill error is that create-react-app, by default, hides the webpack config file inside the node- ...
Read more >Webpack 5 errors | ImmutableX Documentation
The reason for this error is that create-react-app uses a version of webpack greater than 5, which, unlike versions < 5, does not...
Read more >BREAKING CHANGE: webpack < 5 used to include polyfills ...
I am getting a number of errors like this: BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by...
Read more >Webpack 5 Issues | Documentation - Web3Auth
This issue is caused due to the fact that the web3.js and ethers.js packages have certain dependencies, which are not present within the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
From one day to another, I now get 200+ Webpack polyfill errors in one project. Other projects with Laravel Mix work fine. This is really strange…
Edit: I had an
import { options } from "laravel-mix";
in my code. That was the issue for me.Same issue here. I use the “Auto Import - ES6, TS, JSX, TSX” extension in VScode. It added this line in one of the react jsx files:
import { react } from “laravel-mix”;