Skip to content

@tailwindcss/upgrade - JavaScript heap out of memory #17228

Closed as duplicate of#15785
@jcalfee

Description

@jcalfee

What version of Tailwind CSS are you using?

v4.0.14

What build tool (or framework if it abstracts the build tool) are you using?

For example: solid-start 0.3.11

What version of Node.js are you using?

v20.18.1

What operating system are you using?

For example: Linux

Describe your issue

Could you please clarify the RAM requirements for the auto upgrade? I'm up to 4GB and still running out of heap. Is it expected that this would need so much heap or am I looking at a bug? It takes about 5 min of high CPU before it crashes.

The project is not that large (about 128 component files). I certainly have css in ts code and jsx code. I'm not sure what the updater supports.

I am unable to create a reproduction URL. I'm just wondering if this much RAM and CPU is normal.

$ NODE_OPTIONS="--max-old-space-size=4096" npx @tailwindcss/upgrade
⠋(node:808566) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
≈ tailwindcss v4.0.14

│ Searching for CSS files in the current directory and its subdirectories… 


<--- Last few GCs --->

[808605:0xca59510]   281087 ms: Mark-Compact 3777.8 (4128.5) -> 3764.7 (4128.0) MB, 3082.03 / 0.00 ms  (average mu = 0.139, current mu = 0.033) task; scavenge might not succeed
[808605:0xca59510]   281126 ms: Scavenge 3778.5 (4128.0) -> 3766.4 (4128.0) MB, 7.14 / 0.00 ms  (average mu = 0.139, current mu = 0.033) task; 
[808605:0xca59510]   281158 ms: Scavenge 3778.3 (4128.0) -> 3767.7 (4129.0) MB, 8.80 / 0.00 ms  (average mu = 0.139, current mu = 0.033) task; 


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 0xb8d0a3 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
 2: 0xf06250 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 3: 0xf06537 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 4: 0x11180d5  [node]
 5: 0x1118664 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
 6: 0x112f554 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [node]
 7: 0x112fd6c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 8: 0x1188b2c v8::internal::MinorGCJob::Task::RunInternal() [node]
 9: 0xd44d46  [node]
10: 0xd482ef node::PerIsolatePlatformData::FlushForegroundTasksInternal() [node]
11: 0x18c7693  [node]
12: 0x18dc10b  [node]
13: 0x18c83b7 uv_run [node]
14: 0xbd3be6 node::SpinEventLoopInternal(node::Environment*) [node]
15: 0xd18564  [node]
16: 0xd18ffd node::NodeMainInstance::Run() [node]
17: 0xc7d43f node::Start(int, char**) [node]
18: 0x7a6a9da77d90  [/lib/x86_64-linux-gnu/libc.so.6]
19: 0x7a6a9da77e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
20: 0xbd180e _start [node]
Aborted (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions