Skip to content

fix(cli): start Next.js on Windows with Node 22+ - #2733

Draft
josephfusco wants to merge 3 commits into
canaryfrom
fix/cli-windows-spawn
Draft

josephfusco wants to merge 3 commits into
canaryfrom
fix/cli-windows-spawn

Conversation

@josephfusco

Copy link
Copy Markdown
Member

Fixes #2725

The Windows path hasn't been run on a Windows machine yet; macOS was checked by running the built CLI against an installed Next.js and with Next.js missing.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with diagnosing the Windows spawn failure and writing the fix and tests.

Run the Next.js CLI script with the current Node binary instead of
spawning next.cmd, which Node rejects with EINVAL since the
CVE-2024-27980 fix. Exit non-zero with an error when Next.js can't be
found or fails to start, instead of exiting 0 silently.

Fixes #2725
@josephfusco josephfusco added [Type] Bug An existing feature is broken [Area] Compatibility WordPress, Next.js, Node.js, and third-party compatibility [Area] CLI Issues for the @faustwp/cli package labels Nov 16, 2026
Move the spawn into runNext so the exit-code handling behind #2725
can be tested.
Next.js has always published bin as an object.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] CLI Issues for the @faustwp/cli package [Area] Compatibility WordPress, Next.js, Node.js, and third-party compatibility [Type] Bug An existing feature is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

faust dev / build / start silently exits on Windows with Node.js 24 (EINVAL spawning .cmd file without shell: true)

1 participant