question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug report

Describe the bug

on a next dev or next build, node runs out of memory.

To Reproduce

run yarn build see this error:

$ next build
$ tsc --project tsconfig.server.json
Warning: Built-in CSS support is being disabled due to custom CSS configuration being detected.
See here for more info: https://err.sh/next.js/built-in-css-disabled

Creating an optimized production build .
<--- Last few GCs --->

[7951:0x108008000]    35387 ms: Mark-sweep 1952.3 (2088.8) -> 1936.1 (2088.0) MB, 313.2 / 0.0 ms  (average mu = 0.157, current mu = 0.070) allocation failure scavenge might not succeed
[7951:0x108008000]    35714 ms: Mark-sweep 1953.8 (2092.3) -> 1938.5 (2090.8) MB, 302.1 / 0.0 ms  (average mu = 0.124, current mu = 0.076) allocation failure scavenge might not succeed


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x100931399]
Security context: 0x3c879d1408a1 <JSObject>
    1: add [0x3c879d14ddb9](this=0x3c8743530c61 <Set map = 0x3c87b6fc23c1>,0x3c87663ba029 <Very long string[47196]>)
    2: new Set(aka Set) [0x3c879d14d8a9](this=0x3c8711c80589 <the_hole>,0x3c8793782321 <Set map = 0x3c87b6fc23c1>)
    3: ConstructFrame [pc: 0x1008ad37a]
    4: StubFrame [pc: 0x100991b00]
    5: doResolve [0x3c87f79a1a19] [/...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x10007f4b9 node::Abort() [/.fnm/node-versions/v12.15.0/installation/bin/node]
 2: 0x10007f63d node::OnFatalError(char const*, char const*) [/.fnm/node-versions/v12.15.0/installation/bin/node]
 3: 0x100176a27 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/.fnm/node-versions/v12.15.0/installation/bin/node]
 4: 0x1001769c3 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/.fnm/node-versions/v12.15.0/installation/bin/node]
 5: 0x1002fab75 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/.fnm/node-versions/v12.15.0/installation/bin/node]
 6: 0x1002fc244 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/.fnm/node-versions/v12.15.0/installation/bin/node]
 7: 0x1002f9117 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/.fnm/node-versions/v12.15.0/installation/bin/node]
 8: 0x1002f70fd v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/.fnm/node-versions/v12.15.0/installation/bin/node]
 9: 0x100302814 v8::internal::Heap::AllocateRawWithLightRetry(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/.fnm/node-versions/v12.15.0/installation/bin/node]
10: 0x10030288f v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/.fnm/node-versions/v12.15.0/installation/bin/node]
11: 0x1002ce269 v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::RootIndex, int, v8::internal::Object, v8::internal::AllocationType) [/.fnm/node-versions/v12.15.0/installation/bin/node]
12: 0x100507bab v8::internal::OrderedHashTable<v8::internal::OrderedHashSet, 1>::Rehash(v8::internal::Isolate*, v8::internal::Handle<v8::internal::OrderedHashSet>, int) [/.fnm/node-versions/v12.15.0/installation/bin/node]
13: 0x1005df0f9 v8::internal::Runtime_SetGrow(int, unsigned long*, v8::internal::Isolate*) [/.fnm/node-versions/v12.15.0/installation/bin/node]
14: 0x100931399 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/.fnm/node-versions/v12.15.0/installation/bin/node]
error Command failed with signal "SIGABRT".

Expected behavior

build runs successfully.

System information

  • OS: MacOS, ubuntu
  • Version of Next.js: 9.3.6
  • Version of Node.js: 12.15.0

Additional context

builds fine with 9.3.5.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
zetokecommented, Apr 28, 2020

Looks like i found a point where it started to fail. It was turning on paths support by default in 9.3.6-canary.3 I don’t know why but I had node_modules in tsconfig paths and it was a problem. image So this change made everything work as expected

@VinSpee sorry for not answering questions

  1. Yeah, I can if it’s still actual
  2. Yeah. But I use ts-node only for development purposes (so only next build fails in my case).
3reactions
zetokecommented, Apr 28, 2020

So I think the workaround/fix for people can be looking into paths in tsconfig or jsconfig and making sure that it doesn’t have weird stuff as in a previous message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advance notice of end of support for Zoom Rooms Controller ...
Any devices that cannot upgrade past iOS 9.3.6 should be considered for replacement by a new Zoom Room Controller or Scheduling Display device...
Read more >
7 Things to Know About the iPhone 4s iOS 9.3.6 Update
Here's everything you need to know about Apple's surprise iOS 9.3.6 update for the iPhone 4s.
Read more >
Can not use google class room on my old ipad ios ver 9.3.6
To reinstall the app: 1. Go to the App Store. 2. Search for Google Classroom. 3. Tap on the install icon next to...
Read more >
If your iPhone or iPad won't update - Apple Support (EG)
If you can't connect your device to your computer, you can make room for the update by removing content and apps on your...
Read more >
[NEW] Fix Error Loading Tap to Retry YouTube iPad / iPhone
5 / 9.3.6 | 2022 - YouTube.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found