vercel / next.js

The React Framework
https://nextjs.org
MIT License
127.13k stars 27.02k forks source link

Default hostname for "next start" differs from documentation #68836

Open toresbe opened 3 months ago

toresbe commented 3 months ago

Link to the code that reproduces this issue

https://github.com/toresbe/nextjs-empty

To Reproduce

  1. Run npm run startHelp (invokes "next start --help")
  2. Observe that default value for hostname is documented as "0.0.0.0"
  3. Run npm run startDefault (invokes "next start")
  4. Observe that only localhost is used
  5. Run npm run startExplicit (invokes "next start -H 0.0.0.0")
  6. Observe that now, 0.0.0.0 is used.

Current vs. Expected behavior

I expected server to listen on 0.0.0.0 by default, but localhost is default value.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 22.5.1
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 14.2.5 // Latest available version is detected (14.2.5).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: N/A

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

Documentation, Runtime

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

next start (local)

Additional context

I'd have submitted this as a PR, but I wanted to defer to the Vercel team whether it is the documentation or the implementation that is correct

samcx commented 3 months ago

@toresbe Thank you for submitting an issue!

Can you share the :pr:?