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

Netlify dev fails to acquire port. crashes after init. #6498

Open
ashesashes opened this issue Apr 5, 2024 · 0 comments
Open

Netlify dev fails to acquire port. crashes after init. #6498

ashesashes opened this issue Apr 5, 2024 · 0 comments
Labels
type: bug code to address defects in shipped code

Comments

@ashesashes
Copy link

Describe the bug

Netlify dev fails to acquire port. crashes after init.
I did an lsof to make sure the port was available before running netlify dev. It opens, loads a function and then crashes with the message:
Could not acquire required 'port': '3002'
Command failed with exit code 1: npm run start. Shutting down Netlify Dev server

To repro, I first verified if there were ports free. then tried running netlify dev with the port numbers.
same result. "Could not acquire required 'port': 'PORT'"

Steps to reproduce

  1. check if port = 3000 is available
  2. run netlify dev --port=3002
  3. server starts, loads the functions and static files
  4. netlify dev server crashes and shows an error message.
  5. tried with other ports

can repro everytime.

Configuration

[build]
functions = "netlify/functions"
command = "npm run build"
publish = "public/"

[dev]
port = 3002
functions = "netlify/functions"
command = "npm run start"
publish = "public"
framework = "#static"
publicPath = "public"

Environment

System:
OS: macOS 12.5.1
CPU: (10) arm64 Apple M1 Pro
Memory: 291.48 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 21.5.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.2.4 - /opt/homebrew/bin/npm
npmGlobalPackages:
netlify-cli: 17.21.2

@ashesashes ashesashes added the type: bug code to address defects in shipped code label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

1 participant