Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 27, 2025

Next.js 15.4.0+ incorrectly transforms -r to --r= in NODE_OPTIONS, causing build failures with Node.js v24 and monitoring tools (Dynatrace, NewRelic) that inject the short-form flag.

Changes

  • Downgrade Next.js: Pin to 15.3.5 (last stable version before regression)
  • Add troubleshooting docs: Document error, root cause, and workarounds (unset NODE_OPTIONS, use --require long-form, disable monitoring injection, use Node v20)

Context

Error occurs during build:

$ npm run build
--r= is not allowed in NODE_OPTIONS
Next.js build worker exited with code: 9

Upstream issue: vercel/next.js#77550

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • scarf.sh
    • Triggering command: node ./report.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>--r= is not allowed in NODE_OPTIONS</issue_title>
<issue_description>After updating the falkordb-browser today, I cannot build it anymore:

[@ falkordb-browser]$ npm run build --verbose
npm verbose cli .../v24.10.0/bin/node .../v24.10.0/bin/npm
npm info using npm@11.6.1
npm info using node@v24.10.0
npm verbose title npm run build
npm verbose argv "run" "build" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:~/.npm/_logs/2025-10-27T12_51_22_245Z-
npm verbose logfile ~/.npm/_logs/2025-10-27T12_51_22_245Z-debug-0.log

> falkordb-browser@1.4.9 build
> next build

   ▲ Next.js 15.5.2
   - Environments: .env

   Creating an optimized production build ...
 ✓ Compiled successfully in 8.4s
   Linting and checking validity of types  .../v24.10.0/bin/node: --r= is not allowed in NODE_OPTIONS
Next.js build worker exited with code: 9 and signal: null
npm verbose cwd ~/Dev/falkordb-browser
npm verbose os Linux 5.14.0-570.52.1.el9_6.x86_64
npm verbose node v24.10.0
npm verbose npm  v11.6.1
npm verbose exit 9
npm verbose code 9

Steps to reproduce:
git checkout tags/v1.4.9
npm i
npm run build

What I've done, suggested by problems found in the internet:
rm -rf .next
rm -rf ~/.npm
Nothing changes.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Oct 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
falkordb-browser Ready Ready Preview Comment Nov 2, 2025 8:59am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix NODE_OPTIONS error in build process Fix Next.js 15.4+ build failure with NODE_OPTIONS -r flag Oct 27, 2025
Copilot AI requested a review from gkorland October 27, 2025 17:07
Copilot finished work on behalf of gkorland October 27, 2025 17:07
@barakb barakb changed the base branch from main to staging November 2, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--r= is not allowed in NODE_OPTIONS

3 participants