-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
-
I'm not sure whether this belongs to npm or Tailwind, so forgive me.
Whenever I use npx
to watch for changes in my Tailwind classes, after a few minutes it always throws an error like this:
<--- Last few GCs --->
[10672:0000023D44713000] 7904528 ms: Mark-Compact 2042.8 (2087.9) -> 2039.5 (2088.7) MB, pooled: 1 MB, 2267.00 / 0.00 ms (average mu = 0.189, current mu = 0.185) allocation failure; scavenge might not succeed
[10672:0000023D44713000] 7909169 ms: Mark-Compact 2043.5 (2088.7) -> 2040.2 (2097.7) MB, pooled: 0 MB, 4562.91 / 0.00 ms (average mu = 0.086, current mu = 0.017) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 00007FF7811870F7 node::SetCppgcReference+18039
2: 00007FF7810EAA18 v8::base::CPU::num_virtual_address_bits+102920
3: 00007FF781CEF151 v8::Isolate::ReportExternalAllocationLimitReached+65
4: 00007FF781CDBCD6 v8::Function::Experimental_IsNopFunction+3302
5: 00007FF781B38420 v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase+33904
6: 00007FF781B34AAA v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase+19194
7: 00007FF781B4B08C v8::Isolate::GetHeapProfiler+8012
8: 00007FF781B4B90A v8::Isolate::GetHeapProfiler+10186
9: 00007FF781B5C2FB v8::Isolate::GetHeapProfiler+78267
10: 00007FF7818293FB v8::base::AddressSpaceReservation::AddressSpaceReservation+323419
11: 00007FF721D6D8D0
I know I can simply restart the command whenever it happens:
npx tailwindcss -i ./src/input.css -o ./src/output.css --watch
But it has become kind of annoying when I suddenly don’t see changes in the browser, only to find out that I ran out of memory.
Is there any solution for this?
I use tailwind 3.4.17 & npm 10.9.3
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
Btw is this related to this one? (I just found it) If so, I guess it is what it is.
Beta Was this translation helpful? Give feedback.
All reactions
-
Check this :
1: install tailwindcss locally
npm install -D tailwindcss
2: Add to package.json scripts
"dev": "tailwindcss -i ./src/input.css -o ./src/output.css --watch"
3: Run with memory increase
NODE_OPTIONS="--max-old-space-size=4096" npm run dev
Beta Was this translation helpful? Give feedback.