Next.js with webpack 5 hangs on first compile (.next folder is empty) #54
Comments
Can confirm the dev build never finishes on my project with Next.js + webpack 5, no matter how many times I restart the server. With
|
@adamwathan NODE_ENV is development on my side yes because I use next dev. The bug shows when |
I am also seeing next hang when using webpack 5. Dropping to webpack 4 fixes the problem but it would be great to have both the tailwind JIT and webpack 5 filesystem caching running together. |
I have opened an issue over on vercel/next.js for this, and it looks like there's already a pull request over on webpack/webpack to address the issue 🙌 Hopefully it won't be too long before a fix lands in Next.js, but for now you can either disable webpack 5, or use Next.js version |
@bradlc thanks for looking into this! I tried downgrading next.js: 10.0.7 works fine, but for some reason 10.0.8 hangs for me just like 10.0.9. Anyways, since it works with 10.0.7, the problem is not in this package. |
fixes #23125 fixes tailwindlabs/tailwindcss-jit#54 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes
The latest |
Awesome, going to close then — thanks @sokra! |
fixes vercel#23125 fixes tailwindlabs/tailwindcss-jit#54 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes
Hey there, using a brand new create-next-app, using webpack 5, all dependencies up to date, following the tailwindcss-jit README then on first load (when .next folder is empty) the build never finishes.
You have to CTRL+C and then start again for it to work.
Example repo: https://github.com/vvo/tailwindcss-jit-hangs-webpack5-next.js
Now try to load http://localhost:3000 and it will hang forever.
If you restart the server it will work.
To reproduce the hang,
rm -rf .next
.Disabling webpack 5 solves this issue, using webpack 5 using regular tailwindcss works.
PS: On my real-world project, the build never finishes at all, first load or second load, I could not reproduce this behavior though 🤷
The text was updated successfully, but these errors were encountered: