Skip to content
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

yarn add netlify-cli fails with "JavaScript heap out of memory" #3789

Closed
zmwangx opened this issue Dec 10, 2021 · 3 comments
Closed

yarn add netlify-cli fails with "JavaScript heap out of memory" #3789

zmwangx opened this issue Dec 10, 2021 · 3 comments
Labels
status: duplicate type: bug code to address defects in shipped code

Comments

@zmwangx
Copy link

zmwangx commented Dec 10, 2021

Describe the bug

Starting from some time within the past 24 hours, yarn add netlify-cli@latest started failing with "JavaScript heap out of memory". This happens on ubuntu 20.04 on GitHub Actions (see my simple repro repo: https://github.com/zmwangx/netlify-cli-ghactions/runs/4479854634), as well as on local macOS dev machine with ample RAM.

npm install netlify-cli doesn't seem to suffer from this problem, and RAM usage doesn't balloon.

To Reproduce

  1. yarn add netlify-cli.

Configuration

N/A.

Expected behavior

yarn add netlify-cli succeeds.

CLI Output

See this test GitHub Actions run that does nothing other than yarn add netlify-cli: https://github.com/zmwangx/netlify-cli-ghactions/runs/4479854634.

yarn's error dump
...
<--- Last few GCs --->

[1566:0x571e060]    72710 ms: Scavenge 2024.2 (2078.9) -> 2021.0 (2079.9) MB, 10.4 / 0.0 ms  (average mu = 0.368, current mu = 0.345) allocation failure 
[1566:0x571e060]    72730 ms: Scavenge 2025.5 (2079.9) -> 2022.8 (2082.9) MB, 7.1 / 0.0 ms  (average mu = 0.368, current mu = 0.345) allocation failure 
[1566:0x571e060]    72783 ms: Scavenge 2028.4 (2082.9) -> 2025.4 (2100.7) MB, 23.0 / 0.0 ms  (average mu = 0.368, current mu = 0.345) allocation failure 


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb02ec0 node::Abort() [node]
 2: 0xa181fb node::FatalError(char const*, char const*) [node]
 3: 0xced88e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xcedc07 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xea5ea5  [node]
 6: 0xeb557d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 7: 0xeb827e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 8: 0xe796aa v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
 9: 0x11f2e86 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
10: 0x15e7879  [node]
/home/runner/work/_temp/d7867e80-8109-416e-9615-2c70737cb77e.sh: line 1:  1566 Aborted                 (core dumped) yarn global add netlify-cli

Additional context

I tried installing older versions of netlify-cli, including even v6.0.0, same issue. But this issue only started happening in my CI builds some time within the last 24 hours, so it's probably some dependency that's causing the problem. I'm not sure how to pin it down though.

@zmwangx zmwangx added the type: bug code to address defects in shipped code label Dec 10, 2021
@zmwangx
Copy link
Author

zmwangx commented Dec 10, 2021

Oh this is a dupe of the confusingly titled #3788...

fanaticscripter added a commit to fanaticscripter/Egg that referenced this issue Dec 10, 2021
`yarn add netlify-cli` currently doesn't work:
netlify/cli#3789.
zmwangx pushed a commit to fanaticscripter/legendary-study that referenced this issue Dec 10, 2021
`yarn add netlify-cli` currently doesn't work:
netlify/cli#3789.
@kirillgroshkov
Copy link

Yup, we see it too since yesterday night!

@erezrokah
Copy link
Contributor

Thank you @zmwangx and @kirillgroshkov, closing in favor of #3788 (update the title for that issue)

carpetsage pushed a commit to carpetsage/egg that referenced this issue Dec 19, 2022
`yarn add netlify-cli` currently doesn't work:
netlify/cli#3789.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

3 participants