My Port is 8081, but when running using npm run dev, It is redirected to http://localhost:8082/. Due to this, I am facing issue pointing to other URLs. I want localhost to be 8081. Any idea?
Asked
Active
Viewed 1,116 times
0
-
6It sounds like you already have something running on port 8081. – Andy Jan 21 '22 at 13:59
-
You can kill the proccess that runs on the port (according to your OS). – Alon Shmiel Jan 21 '22 at 14:03
-
I am using npm. How to check it in vs code and kill it? – Lakshman Jan 24 '22 at 04:49
1 Answers
1
it look like you have another process running on port 8081 to list process running on a specific port you can do
on windows
the command to identify the process running on a specific port is
netstat -aon | find /i "listening"
you can kill the process with
taskkill /f /pid 1234
on linux
sudo lsof -n -i :8081 | grep LISTEN
it will show you something with columns
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
you can kill the process with
kill -9 pid
the second ones is the pid if you don't want this running process you can stop or kill it

jeremy-denis
- 6,368
- 3
- 18
- 35
-
-
-
-
ok so with vs code you can open a command prompt with this link https://stackoverflow.com/questions/46107955/open-cmd-in-the-visual-studio-code-terminal and use `netstat -aon | find /i "listening"`to identify the running process – jeremy-denis Jan 24 '22 at 12:37
-