-
Notifications
You must be signed in to change notification settings - Fork 27k
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
next build
fails with webpack error
#25276
Comments
This is happen to me as well What version of Next.js are you using? What version of Node.js are you using? What browser are you using? What operating system are you using? How are you deploying your application? Describe the Bug warn - React 17.0.1 or newer will be required to leverage all of the upcoming features in Next.js 11. Read more: https://nextjs.org/docs/messages/react-version chunk webpack [entry]
I've downgraded my next version to 10.2.0 and it seems to be working. |
Also experiencing this. Any ideas as too what is going on? Or how to resolve |
This problem can be solved by adding |
I'm using webpack 4 and started receiving this error today in my monorepo after updating next. Fixed it for now by using |
Upgrading to webpack@5 helps too in my case. However, if you are using preact, you are going to run into another new problem afterwards: preactjs/next-plugin-preact#22 (comment) |
Similar error happens to me as well. But I'm using Webpack v5 and in my case the error appears only in dev mode ( What version of Next.js are you using?10.2.2 What version of Node.js are you using?16.1.0 What browser are you using?Firefox What operating system are you using?macOS Big Sur 11.3.1 How are you deploying your application?Locally Describe the BugGetting the following error when running
The corresponding page is using No issue with Next.js 10.2.0 |
Please provide a reproduction so that we can investigate this. |
@timneutkens Hi check this repo https://github.com/SinimaWath/next-dynamic-css That bug appears only with dynamic Components in project. Edit: And it seems because of this PR https://github.com/vercel/next.js/pull/24573/files @sokra. Without CSS in dynamic chunks, build works fine |
I have this error when building with webpack 4
With webpack 5 it works correctly in dev and it builds, but some pages don't load with the built version. On Next.js 10.2.0 it's fine both with webpack 4 and 5. |
I have tried to fix that bug in mini-css-extract-plugin webpack-contrib/mini-css-extract-plugin#759 As i understand - the main problem is webpack4 has different interface than webpack 5 |
In my case I'm using a web worker, similar to the with-web-worker example. The web worker file (
Which then results in the mentioned error with Next.js >=10.2.1:
I'm able to (temporarily) resolve this error by in-lining the functions directly in the web worker file ( It was working with Next.js 10.2.0. |
Actually, I got the same issue when the version on Next is 10.1.3 and downgrade the version to 10.0.2. And then it works fine for me. Previously I am not able to build even on my local and same for deploy on server. |
I still got the issue on v10.2.3:
The error goes away after i comment out some imports from a worker. That being said, the with-web-worker example works with an import from the worker, so it's something to do with the imported files in our project. Everything is working on 10.1.3 though. |
Please try |
@timneutkens Hmm, @nemanja-tosic is already on v10.2.3 and there are no (related) changes in canary. Btw. I have the same issue - see #25276 (comment). |
Can you open a new issue for that case, as it's different than the one fixed here 👍 |
@timneutkens Thanks, will do in a few minutes! 👍 |
See #25484 for |
future.webpack5 has been moved to webpack5 // next.config.js To : |
I have the same issue, anyone was able to fix it?
I'm stuck with this error ->
|
Heyy guys, never mind, I was able to solve this error by adding |
for me it was f*** node version, was using latest 17.0.1 fixed with nvm to downgrade node to 16.13.0(lts) |
Issue disappeared after upgrading next.js to 11.1.3 from 9.5.3 |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
10.2.1
What version of Node.js are you using?
14.16.0
What browser are you using?
n/a
What operating system are you using?
MacOS, Linux
How are you deploying your application?
AWS
Describe the Bug
When attempting to do a build with
next build
I get the following error. With next 10.2.0, the error does not appear.Oddly enough, this doesn't happen when running the build on MacOS...it only occurs when running in our node:14.15.0-alpine docker container.
Expected Behavior
A clean build.
To Reproduce
next build
I'm unsure what to provide to reproduce the error. The message doesn't give a good indication of where the problem exists or what I might do to provide a minimal project that exercises the issue.
The text was updated successfully, but these errors were encountered: