F
F
ForsakenHedgehog2020-06-25 21:38:15
JavaScript
ForsakenHedgehog, 2020-06-25 21:38:15

Why does port change when dev-server vue-cli starts?

I create a clean vue-cli project (the latest version).
Everything is default, I do not change any settings. I run it through "npm run serve" - ​​in the console I see a standard entry with host addresses and specific ports. Screenshot below:

5ef4ee12c9856875655234.png

When you follow the link, the port magically increases by 1.

5ef4ef326455d229163612.png

I tried to overwrite the value via vue.config -> devServer -> port to an arbitrary one (for example, 3000). Result = arbitrary port +1 (3001).

I don't understand what's the matter.
I work in ubuntu subsystem (wsl).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
segio_tt, 2020-06-26
@art055

in the .env file add PORT=8083
and you will be happy, and if it changes, it means the port is busy and the server is looking for a free port

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question