-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
"JavaScript heap out of memory" problems with PostCSS 7 compatibility build #2986
Comments
@tzurbaev When I had a similar error, the root cause was an endless loop when postcss tried to apply a class recursively. The simplified version of my original code: .italic {
@apply italic;
} My workaround was to simply use CSS instead of .italic {
font-style: italic;
} In my case, I was designing a code syntax theme, and the |
Can confirm, this happened to me a lot of times (8-10 times at least). Not sure if it was a Tailwind issue or Next.js or MDX but it happened a lot while PostCSS was loading to compile for 15-20 seconds which is another problem since v2. |
Sounds related to #2820 |
@AlexVipond thanks for your tip! I checked all occurrences of Unfortunately as a backend developer I have no experience with underlying webpack components, so I guess I'll have to wait while more smart people than me will figure it out 😃 |
Hey! Thank you for your bug report! I am pretty sure this is related to #2820. |
This is happening to me frequently, my |
@justingolden21 can you create a reproduction repo and open up a new issue? |
I can also confirm I still have the issue on tailwind |
I still have those issues running the dev server on a RPi 4B with 8 GB RAM up to a extend where i can barely develop at all.
I fixed the problem and increased performance massively by enabling |
Tried with 16G config with no luck, debug for hours, finally get things right. Don't know why, but just replacing the |
We are also getting heap issues. Sounds like this is a memory leak issue. |
Can confirm I also got this issue when working on a new 11ty project using Tailwind + PostCSS. All the project does is pass a page collection from input to output with Tailwind styles applied, nothing extensive so I was really confused by the error. Weird that it hasn't been fixed since 2020. Edit: Decided to remove tailwind competely and just write my own scss for this project. |
<--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory Same problem here!! |
<--- Last few GCs ---> [18180:0000000000DC6590] 10813234 ms: Mark-Compact 4047.4 (4139.0) -> 4035.5 (4142.8) MB, 1229.66 / 0.00 ms (average mu = 0.633, current mu = 0.117) allocation failure; scavenge might not succeed <--- JS stacktrace ---> FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory 1: 00007FF7D56072EB node::SetCppgcReference+18123 |
I'm upgrading a Vue 2 SPA from tailwindcss 1.4.6 to 2.0. Because of the
PostCSS plugin tailwindcss requires PostCSS 8.
error I'm trying to use PostCSS 7 compatibility build ("tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.1"
). But this version somehow causes OOM errors while building the app.Compilation gets really slow at around 66% and it crashes at random vendor files.
Report 1
Report 2
Report 3
I tried to disable some components & webpack at least was able to finish compilation process without crashing.
The app is relatively large (112 Vue SFCs) but even if number of components can cause such crashes, I have no idea why it was working with previous versions of tailwindcs.
I suspect that this might be related to that compatibility build because with PostCSS 8 there're no OOM errors & it doesn't slow down at ~66%. Also it seems that previous version (1.4.6) was also running on PostCSS 7 and compliation process didn't have such issues.
Repoduction repo
I wasn't able to reproduce this bug in small codebases. Also this is a private project, so I can't share sources with everyone but if someone wants to look into it and/or knows how to debug memory allocation crashes, I can add collaborator to private repository here on Github.
The text was updated successfully, but these errors were encountered: