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

NextJS is reporting Node warnings as errors instead of warnings in the browser #74429

Open
olivierr91 opened this issue Dec 30, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template. Developer Experience Issues related to Next.js logs, Error overlay, etc. Runtime Related to Node.js or Edge Runtime with Next.js.

Comments

@olivierr91
Copy link

olivierr91 commented Dec 30, 2024

Link to the code that reproduces this issue

https://github.com/olivierr91/next-console-error-bug-repro

To Reproduce

  1. Start the application in development (next dev)
  2. Navigate to the page in the browser (http://localhost:3000)
  3. The following server error is thrown in the browser:
(node:33588) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)

image

Current vs. Expected behavior

Node warnings like this should not throw errors in the browser. We should be able to change the value of NODE_TLS_REJECT_UNAUTHORIZED without Next throwing errors and inconveniencing the developer on every page load.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Enterprise
  Available memory (MB): 65376
  Available CPU cores: 16
Binaries:
  Node: 22.12.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.1.1-canary.23
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Developer Experience, Runtime

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

Issue is new in v15 and was not present in v14

@olivierr91 olivierr91 added the bug Issue was opened via the bug report template. label Dec 30, 2024
@github-actions github-actions bot added Developer Experience Issues related to Next.js logs, Error overlay, etc. Runtime Related to Node.js or Edge Runtime with Next.js. labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Developer Experience Issues related to Next.js logs, Error overlay, etc. Runtime Related to Node.js or Edge Runtime with Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant