netlify / netlify/cli

`pnpm dlx netlify dev --offline` not working

Open
#8,019 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
1.9k
Forks
474
Avg merge
23h 30m
Merged PRs (30d)
53

Description

Describe the bug

I am just running

nvm use
pnpm i
pnpm dev

  • this is a monorepo turbo repo set up it, so turbo will run pnpm dlx netlify dev --offline

and then I got this error below


Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.

 ›   Error: Netlify CLI has terminated unexpectedly.

Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.

 ›   Error: Netlify CLI has terminated unexpectedly.

Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.

 ›   Error: Netlify CLI has terminated unexpectedly.

Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.

 ›   Error: Netlify CLI has terminated unexpectedly.

Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.

 ›   Error: Netlify CLI has terminated unexpectedly.

Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.

 ›   Error: Netlify CLI has terminated unexpectedly.

Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.

 ›   Error: Netlify CLI has terminated unexpectedly.

Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.

 ›   Error: Netlify CLI has terminated unexpectedly.

Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.

 ›   Error: Netlify CLI has terminated unexpectedly.

Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.


<--- Last few GCs --->

[76054:0x138008000]   150979 ms: Mark-Compact 4084.6 (4106.0) -> 4073.3 (4105.5) MB, pooled: 0 MB, 812.25 / 0.00 ms  (average mu = 0.319, current mu = 0.210) allocation failure; scavenge might not succee
d
[76054:0x138008000]   151944 ms: Mark-Compact 4081.3 (4105.5) -> 4073.9 (4103.0) MB, pooled: 6 MB, 943.50 / 0.00 ms  (average mu = 0.191, current mu = 0.022) allocation failure; scavenge might not succee
d

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

 1: 0x10455b56c node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
 2: 0x10474fea4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
 3: 0x1049ae030 v8::internal::Heap::stack() [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
 4: 0x1049b1404 v8::internal::Heap::HasLowYoungGenerationAllocationRate() [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
 5: 0x1049c2620 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const [/Users/bianca.laube/.nvm/versions/n
ode/v24.7.0/bin/node]
 6: 0x1049c1ef4 void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1>(heap::
base::Stack*, void*, void const*) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
 7: 0x10537748c PushAllRegistersAndIterateStack [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
 8: 0x1049abd34 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
 9: 0x1049a0a60 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/bianca.laube/
.nvm/versions/node/v24.7.0/bin/node]
10: 0x10496c9a4 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawFixedArray(int, v8::internal::AllocationType) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
11: 0x10498dcbc v8::internal::Handle<v8::internal::PropertyArray> v8::internal::Factory::CopyArrayAndGrow<v8::internal::PropertyArray>(v8::internal::DirectHandle<v8::internal::PropertyArray>, int, v8::in
ternal::AllocationType) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
12: 0x104c59dbc v8::internal::JSObject::MigrateToMap(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::JSObject>, v8::internal::DirectHandle<v8::internal::Map>, int) [/Users/bianca.laube/.
nvm/versions/node/v24.7.0/bin/node]
13: 0x104c5b338 v8::internal::(anonymous namespace)::TryFastAddDataProperty(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::JSObject>, v8::internal::DirectHandle<v8::internal::Name>, v8:
:internal::DirectHandle<v8::internal::Object>, v8::internal::PropertyAttributes) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
14: 0x104c4f30c v8::internal::JSReceiver::CreateDataProperty(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::JSReceiver>, v8::internal::PropertyKey, v8::internal::DirectHandle<v8::intern
al::Object>, v8::Maybe<v8::internal::ShouldThrow>) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
15: 0x104c4f0e8 v8::internal::JSReceiver::SetOrCopyDataProperties(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::JSReceiver>, v8::internal::DirectHandle<v8::internal::Object>, v8::inter
nal::PropertiesEnumerationMode, v8::base::Vector<v8::internal::DirectHandle<v8::internal::Object>>, bool) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
16: 0x104e18fec v8::internal::Runtime_CopyDataProperties(int, unsigned long*, v8::internal::Isolate*) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
17: 0x105465f74 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
18: 0x105427b18 Builtins_CloneObjectIC_Slow [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
19: 0x123c64938 
20: 0x1053c8bec Builtins_InterpreterEntryTrampoline [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
21: 0x1053c8bec Builtins_InterpreterEntryTrampoline [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
22: 0x1053c8bec Builtins_InterpreterEntryTrampoline [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
23: 0x1053c8bec Builtins_InterpreterEntryTrampoline [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
24: 0x123c87708 
25: 0x123c84118 
26: 0x123c8db18 
27: 0x1239c534c 
28: 0x123ca9970 
29: 0x1053c68cc Builtins_JSEntryTrampoline [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
30: 0x1053c6570 Builtins_JSEntry [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
31: 0x1048f2608 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
32: 0x1048f1f6c v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::Object>, v8::internal::DirectHandle<v8::internal::Object>, v8::base::Vector<v8::internal::Di
rectHandle<v8::internal::Object> const>) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
33: 0x104767e1c v8::Function::Call(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
34: 0x10455c8c4 node::errors::TriggerUncaughtException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>, bool) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
35: 0x10455d100 node::errors::TriggerUncaughtException(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
36: 0x1053ca94c Builtins_CallApiCallbackOptimizedNoProfiling [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
37: 0x123ab3aec 
38: 0x123ca4f14 
39: 0x1053c68cc Builtins_JSEntryTrampoline [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
40: 0x1053c6570 Builtins_JSEntry [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
41: 0x1048f2608 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
42: 0x1048f1f6c v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::Object>, v8::internal::DirectHandle<v8::internal::Object>, v8::base::Vector<v8::internal::Di
rectHandle<v8::internal::Object> const>) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
43: 0x104767e1c v8::Function::Call(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
44: 0x104455014 node::InternalCallbackScope::Close() [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
45: 0x104455250 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context, v8::Local<v8::Value>
) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
46: 0x104468558 node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
47: 0x1044f0fe0 node::(anonymous namespace)::FSEventWrap::OnEvent(uv_fs_event_s*, char const*, int, int) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
48: 0x1053b9630 uv__fsevents_cb [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
49: 0x1053a695c uv__async_io [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
50: 0x1053bacf4 uv__io_poll [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
51: 0x1053a6ec4 uv_run [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
52: 0x104455a78 node::SpinEventLoopInternal(node::Environment*) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
53: 0x1045af398 node::NodeMainInstance::Run() [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
54: 0x104515a20 node::Start(int, char**) [/Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node]
55: 0x18a0deb98 start [/usr/lib/dyld]
 ERROR  Command was killed with SIGABRT (Aborted): npxnetlify dev --offline

pnpm: Command was killed with SIGABRT (Aborted): npxnetlify dev --offline
    at makeError (/Users/bianca.laube/Library/pnpm/.tools/pnpm/10.27.0/node_modules/pnpm/dist/pnpm.cjs:12906:17)
    at handlePromise (/Users/bianca.laube/Library/pnpm/.tools/pnpm/10.27.0/node_modules/pnpm/dist/pnpm.cjs:13477:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Object.handler [as dlx] (/Users/bianca.laube/Library/pnpm/.tools/pnpm/10.27.0/node_modules/pnpm/dist/pnpm.cjs:183080:9)
    at async /Users/bianca.laube/Library/pnpm/.tools/pnpm/10.27.0/node_modules/pnpm/dist/pnpm.cjs:194181:23
    at async main (/Users/bianca.laube/Library/pnpm/.tools/pnpm/10.27.0/node_modules/pnpm/dist/pnpm.cjs:194139:34)
    at async runPnpm (/Users/bianca.laube/Library/pnpm/.tools/pnpm/10.27.0/node_modules/pnpm/dist/pnpm.cjs:194406:5)
    at async /Users/bianca.laube/Library/pnpm/.tools/pnpm/10.27.0/node_modules/pnpm/dist/pnpm.cjs:194398:7
 ELIFECYCLE  Command failed with exit code 1.
command finished with error: command (/Users/bianca.laube/Documents/repos/docs-content-repos/docs-mongodb-internal/platform/docs-nextjs) /Users/bianca.laube/Library/pnpm/.tools/pnpm/10.27.0/bin/pnpm run 
dev exited (1)
└─ docs-nextjs#dev ──
docs-nextjs#dev: command (/Users/bianca.laube/Documents/repos/docs-content-repos/docs-mongodb-internal/platform/docs-nextjs) /Users/bianca.laube/Library/pnpm/.tools/pnpm/10.27.0/bin/pnpm run dev exited (1)

 Tasks:    2 successful, 4 total
Cached:    1 cached, 4 total
  Time:    2m34.14s 
Failed:    docs-nextjs#dev

 ERROR  run failed: command  exited (1)
 ELIFECYCLE  Command failed with exit code 1.
Steps to reproduce

I am just running

nvm use
pnpm i
pnpm dev

this is a monorepo turbo repo set up it, so turbo will run pnpm dlx netlify dev --offline

Configuration

netlify.toml

[[redirects]]
from = "/docs/docs_static_nextjs/_next/*"
to = "/_next/:splat"
status = 200

[dev]
framework = "next"
command = "next dev"
publish = ".next"
Environment
 System:
    OS: macOS 15.7.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.60 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.7.0 - /Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/node
    npm: 11.5.1 - /Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/npm
    pnpm: 10.27.0 - /Users/bianca.laube/.nvm/versions/node/v24.7.0/bin/pnpm

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing pnpm dlx netlify dev --offline from the reported monorepo setup and inspect the Netlify CLI offline execution path around the Node.js heap-out-of-memory failure. Done means the command runs without terminating unexpectedly or exhausting the JavaScript heap.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.