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.

nuxi start produces error when previewing

See original GitHub issue

While building like this command nuxi build it produces the following

Nuxt CLI v3.0.0-27501460.04a72f8                                                                                          03:32:34
i Merging Tailwind config from ~/tailwind.config.js                                                      nuxt:tailwindcss 03:32:36
i Vite client warmed up in 4269ms                                                                                         03:32:41

 WARN                                                                                                                     03:32:44
(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

i Client built in 6965ms                                                                                                  03:32:44
i Building server...                                                                                                      03:32:44
√ Server built in 918ms                                                                                                   03:32:45
√ Generated public .output/public                                                                                   nitro 03:32:46
start Building server...                                                                                            nitro 03:32:46
start Writing server bundle...                                                                                      nitro 03:32:50
√ Server built                                                                                                      nitro 03:32:50
  ├─ .output/server/package.json (1.4 kB) (534 B gzip)
  ├─ .output/server/index.mjs (372 B) (205 B gzip)
  ├─ .output/server/chunks/vue3.mjs (283 B) (197 B gzip)
  ├─ .output/server/chunks/static.mjs (5.98 kB) (1.83 kB gzip)
  ├─ .output/server/chunks/server.mjs (243 kB) (48.4 kB gzip)
  ├─ .output/server/chunks/renderer.mjs (23.3 kB) (6.46 kB gzip)
  ├─ .output/server/chunks/node-server.mjs (12.1 kB) (3.96 kB gzip)
  ├─ .output/server/chunks/index.mjs (397 kB) (91.6 kB gzip)
  └─ .output/server/chunks/client.manifest.mjs (3.07 kB) (555 B gzip)
Σ Total size: 6.45 MB (1.52 MB gzip)
i You can preview this build using node .output/server/index.mjs                                                    nitro 03:32:51 
  1. While starting it. using nuxi build
Listening on http://localhost:3000/

<--- Last few GCs --->

[11080:00000215A353BDA0]    57470 ms: Mark-sweep (reduce) 4096.1 (4105.6) -> 4086.6 (4096.2) MB, 15.4 / 0.0 ms  (average mu = 0.696, current mu = 0.701) allocation failure scavenge might not succeed
[11080:00000215A353BDA0]    57499 ms: Mark-sweep (reduce) 4096.1 (4105.7) -> 4096.1 (4105.7) MB, 15.3 / 0.0 ms  (average mu = 0.612, current mu = 0.469) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF7DF82815F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+114079
 2: 00007FF7DF7B54C6 DSA_meth_get_flags+65542
 3: 00007FF7DF7B637D node::OnFatalError+301
 4: 00007FF7E00EBA0E v8::Isolate::ReportExternalAllocationLimitReached+94
 5: 00007FF7E00D5FED v8::SharedArrayBuffer::Externalize+781
 6: 00007FF7DFF793BC v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468
 7: 00007FF7DFF764D4 v8::internal::Heap::CollectGarbage+4244
 8: 00007FF7DFF73E50 v8::internal::Heap::AllocateExternalBackingStore+2000
 9: 00007FF7DFF91B60 v8::internal::FreeListManyCached::Reset+1408
10: 00007FF7DFF92215 v8::internal::Factory::AllocateRaw+37
11: 00007FF7DFFA78EB v8::internal::FactoryBase<v8::internal::Factory>::NewRawOneByteString+75
12: 00007FF7DFD8B16B v8::internal::String::SlowFlatten+395
13: 00007FF7DFAF53CB v8::internal::WasmTableObject::Fill+603
14: 00007FF7DFCDD309 v8::internal::RegExp::ExperimentalOneshotExec+1161
15: 00007FF7DFCDCDC7 v8::internal::RegExp::Exec+199
16: 00007FF7DFCB8C7C v8::internal::DeclarationScope::was_lazily_parsed+21452
17: 00007FF7E0179701 v8::internal::SetupIsolateDelegate::SetupHeap+494417
18: 00007FF7E01D0AF3 v8::internal::SetupIsolateDelegate::SetupHeap+851779
19: 00007FF7E016D284 v8::internal::SetupIsolateDelegate::SetupHeap+444116
20: 00000215A539E54B

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:8
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
birdlavvcommented, Apr 24, 2022

While I haven’t been able to produce a minimal reproduction today, I was able to get a working workaround. It would build fine, but running and visiting the demo server would produce the same memory error reported by @anburocky3

I added the troublesome module (lodash in my case) to the noExternal list in the nuxt.config and this seemed to resolve the issue.

nuxt.config.ts

export default defineNuxtConfig({
    vite: {
        ssr: {
          noExternal: ['lodash']
        }
    }
})
2reactions
NidMocommented, Apr 20, 2022

I found this problem when using the crypto JS library

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt static website with nuxi generate doesn't generate html files
I develop a static website using Nuxt (Nuxt bridge). In my nuxt.config.js : { ... ssr: false, target: "static", bridge: { nitro: false,...
Read more >
8.3.5. Searching For and Viewing Denials
This section assumes the setroubleshoot, setroubleshoot-server, dbus and audit packages are installed, and that the auditd , rsyslogd , and setroubleshootd ...
Read more >
Troubleshoot Azure Automation Update Management issues
Scenario: Update run returns Failed status (Linux). Issue. An update run starts but encounters errors during the run. Cause. Possible causes:.
Read more >
Error Message When Viewing FederationWSCustomUserStore
Symptom: On Windows 2000 SP4 Japanese OS system, SiteMinder displays the error, "Search operation failed: SiteMinder Administration Error: User directory error.
Read more >
CUDA on WSL User Guide - NVIDIA Documentation Center
The guide for using NVIDIA CUDA on Windows Subsystem for Linux. ... To get started with running CUDA on WSL, complete these steps...
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