Port switching #23932
Replies: 7 comments
-
I believe this has been asked before and I believe it is not something they intend to do. I cannot find the issue/discussion though with the answer. There is a discussion though asking for the same thing |
Beta Was this translation helpful? Give feedback.
-
I found this is a repetitive process every time I've to kill port and run the next dev script again and again. what do you think? @jamesmosier |
Beta Was this translation helpful? Give feedback.
-
I've found that most of the time when port 3000 is in use already, it's because I have my Next.js app already running in a different terminal window, and I appreciate being told about the issue instead of just moving to a different port. How frequently do you have this issue? Sounds like you should just permanently change the port you develop your Next.js app on by updating your
|
Beta Was this translation helpful? Give feedback.
-
If you have vercel-cli installed doing |
Beta Was this translation helpful? Give feedback.
-
I like the If I run a BUT, if I start my Next project before it, it takes the port 3000 and when I start ? Something is already running on port 3000.
Would you like to run the app on another port instead? (Y/n) |
Beta Was this translation helpful? Give feedback.
-
It's pretty annoying that Next doesn't do this. If the port is in use, it should automatically ask if you'd like to use the next port (like create-react-app, Vue CLI, etc). I occasionally open up several Next apps and want to quickly run them to check something so it's frustrating that I need need to close it or edit a setting for each project. Here's the PR when CRA implemented it: facebook/create-react-app#101 |
Beta Was this translation helpful? Give feedback.
-
No it doesn't! I am using it and still having same issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature request
When we run
next dev
command then before starting the servernext
should check for a port number 3000 is available or not if not thennext
should be switch to another port instead of throwingPort 3000 is already in use.
error.Is your feature request related to a problem? Please describe.
If port 3000 is locked due to another process then I've kill running process on port number 3000 or need to pass a port number with -p to
next dev
command. In my point of view,next
should be switch to an available port number instead of throwing error.Describe alternatives you've considered
There are two ways either you've to manually close port number forcefully or you've to pass a port number to
next dev
command.Beta Was this translation helpful? Give feedback.
All reactions