score:503
Delete the .next
folder at the root of your project, relaunch your project, and force-refresh your page (Shift+F5 / Cmd+Shift+R) to remove the cache.
It apparently is a cache issue. After browsing through GH Issues & various blog posts, my conclusion is that nobody knows what the heck is going on with this webpack-related error, probably caused by Next.js's behavior.
score:1
For me, the problem appeared when I added a plugin to tailwind.config.js (using tailwind)
maybe this will help someone locate strange nextjs behavior
score:1
In my case, I couldn't find the .next folder to be deleted.
Delete all the contents of the build / folder. This worked for me.
score:1
I deleted the .next folder in VSC. The console log generated more errors, so I then restored the folder back to the project. The errors disappeared.
score:5
In my case i had my next.js build directory with a different name as hosted with firebase cloud functions. Follow these similar steps
- Delete your build (distDir) directory (mine was called nextjs)
- Restart the server
- Force Refresh the browser
score:23
I had this error after removing files from the /public folder.
How I fixed it:
- Remove your /.next folder.
- Launch your project again.
- Force refresh in you browser to delete the cache.
Source: stackoverflow.com
Related Query
- Vercel Next js Uncaught (in promise) ChunkLoadError: Loading chunk 0 failed
- ChunkLoadError: Loading chunk node_modules_next_dist_client_dev_noop_js failed
- Webpack - Loading chunk 0 failed
- Import css files from node modules in Next JS?
- How to import modules from a folder outside node modules in next js
- How to send file from React/Next.js client UI to Node server and next to Flask service
- React Code-Splitting: ChunkLoadError: Loading chunk 0 failed
- Unhandled Rejection (ChunkLoadError): Loading chunk 1 failed
- Wepback. Loading chunk failed after using `import()`
- Uncaught SyntaxError: Unexpected token '<' and ChunkLoadError: Loading chunk 16 failed
- react dev tools not loading in Chrome browser
- React DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node
- Loading Screen on next js page transition
- Dynamic loading of external modules in webpack fails
- create react app not loading css background images in dev or build
- Editing code of react npm modules in node module folder
- Node modules issue: Only one default export allowed per module
- Importing node modules to web worker in React/Webpack app
- Apollo client query error: "Network error: Failed to fetch" How to troubleshoot?
- Webpack 5 module federation missing chunk when dynamically loading remote module
- Reactjs:How to hide node modules and webconfig in the devtools on production app?
- Flow erroring "cant resolve module" when importing node modules
- ChunkLoadError: Loading chunk XY failed. - Randomly getting fatal on PRODUCTION
- Using webpack to load CSS files from node modules
- React js SyntaxError Occurs in Node Modules webpack chokidar.js 'return' outside of function (4:2)
- Using kebab-case CSS classnames in CSS/SASS modules when using Next js
- I'm trying to download a pdf file from a node server to a react client but when I open it, it shows blank
- How to use Native Node Modules on a React, ES6, Electron App?
- FirebaseError: Failed to get document because the client is offline
- Using node modules in Laravel
More Query from same tag
- routing issue in reactjs where the matchUrl is coming from parent component
- How can i prefill calendly guests email?
- Add unique elements to array
- React input value not working in child component
- React: Ternary operation in JSX produces "Unexpected token" error
- How can I make description text from quill delta object
- Parse tags in react
- React component lifecycle and initiating asynchronous processes
- griddle-react: How can I externalize the rows settings from the settings menu
- Adding jwt token to GET request not working in React
- Update redux state with an input
- How to customize react-bootstrap modal
- Get updated data from database with reactjs, axios and php
- Environment variables are not working in React app
- Show Date/time in x axis using react d3
- "Error: You may not call store.getState() while the reducer is executing."
- Type 'MouseEvent<HTMLButtonElement, MouseEvent>' is not assignable to type 'MouseEventHandler<HTMLButtonElement>'
- How to simulate mouse over event on a div using enzyme for testing a react application?
- React JS WYSIWUG Saving
- What is the reason behind react component showing the changes of state inside them?
- Outputting variable content to React Component
- React Native load image dynamically
- React - Prevent Event Trigger on Parent From Child
- ReactJS assign click handler in for loop
- TypeError: Cannot read property 'push' of undefined in react apps
- why importing CSSRulePlugin in Next.js results in error?
- state is not updating after onclick event occurs - reactjs
- Removing chart on click event produces 'removeHoverStyle' of null error
- Using typescript and styled-component when extending third-party component
- onChange handler for Object.keys().map in React to update object properties