Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODE_OPTIONS environment variable not working on render server #48376

Closed
1 task done
Cow258 opened this issue Apr 14, 2023 · 1 comment · Fixed by #48019
Closed
1 task done

NODE_OPTIONS environment variable not working on render server #48376

Cow258 opened this issue Apr 14, 2023 · 1 comment · Fixed by #48019
Labels
bug Issue was opened via the bug report template.

Comments

@Cow258
Copy link
Contributor

Cow258 commented Apr 14, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 22.3.0: Thu Jan  5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000
Binaries:
  Node: 18.14.0
  npm: 9.3.1
  Yarn: 1.22.19
  pnpm: 8.2.0
Relevant packages:
  next: 13.3.1-canary.6
  eslint-config-next: 13.3.0
  react: 18.2.0
  react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue

pnpm create next-app

To Reproduce

Add the follow line into package.json > "script"

"dev:debug": "NODE_OPTIONS='--inspect' next dev",

Then run pnpm dev:debug

Describe the Bug

image
The NODE_OPTIONS arguments did not pass to render server,
any break point will not working,
even debugger; also not working.

Expected Behavior

image
The NODE_OPTIONS arguments should pass down to render server,
and the render server debug port should be mounted to 9230.

Which browser are you using? (if relevant)

Chrome 111.0.5563.146

How are you deploying your application? (if relevant)

Vercel

@Cow258 Cow258 added the bug Issue was opened via the bug report template. label Apr 14, 2023
ijjk added a commit that referenced this issue May 23, 2023
## Bug

This fix closes #47083 issue 
This fix closes #47561 issue
This fix closes #48376 issue
**Invalid repetition PRs:** #47671 (this PR changing expired code)
(This issue still exist on
[v13.4.3-canary.1](https://github.com/vercel/next.js/releases/tag/v13.4.3-canary.1)

- [x] Related issues linked using `fixes #number`

### What?
When running `NODE_OPTIONS='--inspect' next dev`, 
the render server didn't start with `--inspect`. 
In some cases, 
the `--inspect` flag will be passed when `__NEXT_DISABLE_MEMORY_WATCHER`
was set.

### Why?
Since #47208 revamped some startup processes, the `NODE_OPTIONS`
environment parameter is not passed down to the render server worker.

### How?
Just add back the original startup process.


![image](https://user-images.githubusercontent.com/14261588/230398898-791e6909-6f4c-493b-937d-058a7b788849.png)


link NEXT-1176

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
hydRAnger pushed a commit to hydRAnger/next.js that referenced this issue Jun 12, 2023
## Bug

This fix closes vercel#47083 issue 
This fix closes vercel#47561 issue
This fix closes vercel#48376 issue
**Invalid repetition PRs:** vercel#47671 (this PR changing expired code)
(This issue still exist on
[v13.4.3-canary.1](https://github.com/vercel/next.js/releases/tag/v13.4.3-canary.1)

- [x] Related issues linked using `fixes #number`

### What?
When running `NODE_OPTIONS='--inspect' next dev`, 
the render server didn't start with `--inspect`. 
In some cases, 
the `--inspect` flag will be passed when `__NEXT_DISABLE_MEMORY_WATCHER`
was set.

### Why?
Since vercel#47208 revamped some startup processes, the `NODE_OPTIONS`
environment parameter is not passed down to the render server worker.

### How?
Just add back the original startup process.


![image](https://user-images.githubusercontent.com/14261588/230398898-791e6909-6f4c-493b-937d-058a7b788849.png)


link NEXT-1176

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant