Netlify Dev Port command not working?

I had a netlify dev server running on a site in one tab and fired up another to test something. I noticed it used the same port as the first site, and on checking the docs saw that I could specify a port. So I then tried: netlify dev -p 4001 and the -p was ignored, as far as I could see. Should that have worked?

1 Like

Same thing is happening for me. --port is ignored.

I tried killing all processes on the port I specified, but it didn’t help.

Hey guys, sorry for the confusion, it does seem like the port flag and its use was conflicting. But with the latest version of netlify-cli, you can run multiple instances of netlify dev without specifying port because it tries to get the original port but reverts to a random one if that is not available. They do have to be different kinds of projects, for example, you cannot run multiple instances of netlify dev for create-react-app projects because all create-react-app instances will use port 3000.
In the mean time, working on a fix, perhaps more descriptive flag names.

1 Like