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.
I had this error after removing files from the /public folder.
How I fixed it:
In my case i had my next.js build directory with a different name as hosted with firebase cloud functions. Follow these similar steps
I solved using this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With