“Port 4200 is already in use” when running the ng serve command
up vote
86
down vote
favorite
I am learning angular 2 and for the first time I am using the angular CLI project to create a sandbox project.
I was able to run the command "ng serve" and it works great. I wanted to stop it from running so I ran "Control Z".
When I tried to run the "ng-serve" command again it gives me "Port 4200 is already in use."
I ran "PS" to get a list of the PID and killed the PID for the angular-cli and ran "ng-serve" again still it gives the same port in use error.
angular
add a comment |
up vote
86
down vote
favorite
I am learning angular 2 and for the first time I am using the angular CLI project to create a sandbox project.
I was able to run the command "ng serve" and it works great. I wanted to stop it from running so I ran "Control Z".
When I tried to run the "ng-serve" command again it gives me "Port 4200 is already in use."
I ran "PS" to get a list of the PID and killed the PID for the angular-cli and ran "ng-serve" again still it gives the same port in use error.
angular
add a comment |
up vote
86
down vote
favorite
up vote
86
down vote
favorite
I am learning angular 2 and for the first time I am using the angular CLI project to create a sandbox project.
I was able to run the command "ng serve" and it works great. I wanted to stop it from running so I ran "Control Z".
When I tried to run the "ng-serve" command again it gives me "Port 4200 is already in use."
I ran "PS" to get a list of the PID and killed the PID for the angular-cli and ran "ng-serve" again still it gives the same port in use error.
angular
I am learning angular 2 and for the first time I am using the angular CLI project to create a sandbox project.
I was able to run the command "ng serve" and it works great. I wanted to stop it from running so I ran "Control Z".
When I tried to run the "ng-serve" command again it gives me "Port 4200 is already in use."
I ran "PS" to get a list of the PID and killed the PID for the angular-cli and ran "ng-serve" again still it gives the same port in use error.
angular
angular
asked Aug 23 '16 at 3:13
peztherez
71821117
71821117
add a comment |
add a comment |
34 Answers
34
active
oldest
votes
1 2
next
up vote
133
down vote
accepted
This is what I used to kill the progress on port 4200
sudo kill $(sudo lsof -t -i:4200)
You could also try this:
sudo kill `sudo lsof -t -i:4200`
For windows users:
Port number 4200 is already in use. Type below command in cmd:
netstat -a -n -o
And then, find port with port number 4200 by right click on terminal and click find, enter 4200 in "find what" and click "find next":
Let say you found that port number 4200 is used by pid 18932. Type below command in cmd:
taskkill -f /pid 18932
21
This does not work for Windows users
– Hinrich
Jan 23 '17 at 8:49
1
While I realize that this is the correct solution, does this not seem to be a horrible solution? What if I want to runng serve
on a different directory? Doesn't make sense to kill the server this way and then restart it somewhere else or am I missing something?
– Nathan Dunn
May 2 '17 at 4:49
4
You can specify a different port with:--port <new_port>
– hestellez
Jun 10 '17 at 5:07
2
This kills the default browser. And not helpful.
– shijin
Jun 20 '17 at 13:08
4
this did murder my browser window. I figured it out eventually though... I had done a^Z
on an existing angular instance that was using the default port, silly me!
– tenCupMaximum
Jul 25 '17 at 1:56
|
show 3 more comments
up vote
107
down vote
Open your cmd.exe
as administrator
,
then Find the PID
of port 4200
netstat -ano | findstr :4200
Here i have 3 PID :
- Red one is from "ng-serve" (127.0.0.1:4200) that
LISTENING
- Green one is from "your browser"
kill only port 4200 (kill the red PID):
taskkill /PID 15940 /F
note : kill the green one will only lead your browser closed by force.
now you can do "ng-serve" to start your angular app at the same port 4200
Additional Stuff :
One liner : After looking a way to optimize this, Here is the One-liner command of this answer : (special thanks to : Josep Alsina for this tips)
for /f "tokens=5" %a in ('netstat -ano ^| find "4200" ^| find "LISTENING"') do taskkill /f /pid %a
5
Added one-line code for windows command prompt, thanks ^^.
– Anthony Kal
Jul 13 '17 at 3:36
2
Remember to do it incmd
, notGit Bash
.
– Leo
Nov 12 '17 at 0:30
1
Syntsax for GitBash on Windows netstat -ano | findstr :4200; taskkill -PID <establishedPID> -F
– intotecho
Mar 7 at 2:00
Updating GIt Bash fix my problem
– Ismail Farooq
Mar 20 at 6:43
This should be accepted as answer
– andrey.shedko
Nov 21 at 12:22
add a comment |
up vote
46
down vote
On Mac OS X you need the following command:
sudo lsof -t -i tcp:4200 | xargs kill -9
Remember you need to kill Angular's web server with Command+C.
add a comment |
up vote
9
down vote
Not ctrl+Z,
you must run for stop ctrl+C
it's worked, I checking
by far the simplest solution to the problem, even if technically it does not respond to the OP question
– Flo
Nov 21 at 9:04
add a comment |
up vote
8
down vote
Use this command to kill ng:
pkill -9 ng
add a comment |
up vote
8
down vote
ng serve --port <YOUR_GIVEN_PORT_NUMBER>
You should try above command to run on your given port.
add a comment |
up vote
7
down vote
I also faced the same error msg, so i tried ng serve --port 12012 and it worked fine.
5
we cannot alot new port everytime.
– shijin
Jun 20 '17 at 13:09
7
Who is upvoting answers like these?
– shark1608
Nov 10 '17 at 17:55
add a comment |
up vote
6
down vote
When you use Ctrl+Z
, you are going to suspend a running task but not to kill it. You can later use command fg
to resume the task.
If you want to quit ng serve
, you should use Ctrl+C
instead, in which will also release the 4200 port.
add a comment |
up vote
5
down vote
We can forcefully kill the port by following command.
kill -2 $(lsof -t -i:4200)
add a comment |
up vote
4
down vote
ng serve --port 4201 --live-reload-port 4200
and access using localhost:4201
This should work as a temporary solution.
or
try listing port usage usinglsof -i:4200
and kill it manually usingsudo kill -9 <Process PID using port 4200>
add a comment |
up vote
3
down vote
For Windows:
Open Command Prompt and
type: netstat -a -o -n
Find the PID of the process that you want to kill.
Type: taskkill /F /PID 16876
This one 16876 - is the PID for the process that I want to kill - in that case, the process is 4200 - check the attached file.you can give any port number.
Now, Type : ng serve
to start your angular app at the same port 4200
add a comment |
up vote
2
down vote
netstat -anp | grep ":4200"
This will tell you who's got the port.
is it - anp ? that returned nothing so I just added a space because your command was asking for "nestat: option requires an argument --p "
– peztherez
Aug 23 '16 at 3:38
Your netstat must be different from mine. Maybe add an OS tag.
– Joshua
Aug 23 '16 at 21:26
add a comment |
up vote
2
down vote
The most simple one line command:
sudo fuser -k 4200/tcp
add a comment |
up vote
1
down vote
You can also try with this to run your application in visual studio code -:
ng serve --open --port 4201
you can give any port number.
add a comment |
up vote
1
down vote
you can use fuser -k 4200/tcp if it is Linux Operating system
add a comment |
up vote
1
down vote
Kill process and close the terminal which you used for running the app on that port.
add a comment |
up vote
1
down vote
Instead of killing the whole process or using ctrl+z
, you can simply use ctrl+c
to stop the server and can happily use ng serve command
without any errors
or if you want to run on a different port simply use this command ng serve --port portno(ex: ng serve --port 4201)
.
add a comment |
up vote
1
down vote
With ctrl + z you put the program in the background.
On Linux you can get the session back in the foreground with the following command:
fg ng serve
You don't need to kill the process.
add a comment |
up vote
0
down vote
If you compiling your angular JS code in both CMD and IDE then this issue occur. In CMD, your angular JS code compile automatically whenever you change your angular JS code in IDE and then your IDE want to occupy the same port i.e 4200 which is occupied by CMD already
So, there is a simple solution for this issue, just close your cmd while compiling your code in IDE.
add a comment |
up vote
0
down vote
I was facing the same issue every time I have to kill the port.
I tried ./node_modules/.bin/ng serve --proxy-config proxy.conf.json --host 0.0.0.0
Instead of npm start
and its works
add a comment |
up vote
0
down vote
On linux mint 17, this is working.
kill -9 $(lsof -t -i:4200)
add a comment |
up vote
0
down vote
It is possible to change port in .angular-cli
file. For example:
"defaults": {
"styleExt": "css",
"component": {},
"serve": {
"port": 4205
}
}
In addition, it is necessary to add this to your package.json
:
"ng": "ng",
"start": "ng serve"
add a comment |
up vote
0
down vote
It says already we are running the services with port no 4200 please use another port instead of 4200. Below command is to solve the problem
ng serve --port 4300
add a comment |
up vote
0
down vote
Port 4200 is already in use. Use '--port' to specify a different port
This means that you already have another service running on port 4200. If this is the case
you can either . shut down the other service. use the --port
flag when running ng
serve like this:
ng serve --port 9001
Another thing to notice is that, on some machines, the domain localhost may not work.
You may see a set of numbers such as 127.0.0.1. When you run ng serve it should show
you what URL the server is running on, so be sure to read the messages on your machine
to find your exact development URL.
add a comment |
up vote
0
down vote
netstat -plnet
tcp 0 0 127.0.0.1:4200 0.0.0.0:* LISTEN 1001 63955 7077/ng
kill -9 7077
again start your ng serve.
1
While this code snippet may solve the question, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, this reduces the readability of both the code and the explanations!
– Filnor
Jun 8 at 6:06
add a comment |
up vote
0
down vote
In Windows; In command prompt which is running your ng serve just click and press keys:
ctrl + c
It will ask you: Terminate batch job (Y/N)?
and you type Y
add a comment |
up vote
0
down vote
As first step after any changes, I use ng build
, then ng serve
. It works without any problems.
add a comment |
up vote
0
down vote
Just restart the IDE you are using, then it will work.
add a comment |
up vote
0
down vote
Only thing that works for me is to restart my system / device...
Using Webstorm IDE by JetBrains.
add a comment |
up vote
0
down vote
To Access project outside localhost
Example:
ng serve --host 192.168.2.2:7006
add a comment |
1 2
next
StackExchange.ready(function () {
$("#show-editor-button input, #show-editor-button button").click(function () {
var showEditor = function() {
$("#show-editor-button").hide();
$("#post-form").removeClass("dno");
StackExchange.editor.finallyInit();
};
var useFancy = $(this).data('confirm-use-fancy');
if(useFancy == 'True') {
var popupTitle = $(this).data('confirm-fancy-title');
var popupBody = $(this).data('confirm-fancy-body');
var popupAccept = $(this).data('confirm-fancy-accept-button');
$(this).loadPopup({
url: '/post/self-answer-popup',
loaded: function(popup) {
var pTitle = $(popup).find('h2');
var pBody = $(popup).find('.popup-body');
var pSubmit = $(popup).find('.popup-submit');
pTitle.text(popupTitle);
pBody.html(popupBody);
pSubmit.val(popupAccept).click(showEditor);
}
})
} else{
var confirmText = $(this).data('confirm-text');
if (confirmText ? confirm(confirmText) : true) {
showEditor();
}
}
});
});
34 Answers
34
active
oldest
votes
34 Answers
34
active
oldest
votes
active
oldest
votes
active
oldest
votes
1 2
next
up vote
133
down vote
accepted
This is what I used to kill the progress on port 4200
sudo kill $(sudo lsof -t -i:4200)
You could also try this:
sudo kill `sudo lsof -t -i:4200`
For windows users:
Port number 4200 is already in use. Type below command in cmd:
netstat -a -n -o
And then, find port with port number 4200 by right click on terminal and click find, enter 4200 in "find what" and click "find next":
Let say you found that port number 4200 is used by pid 18932. Type below command in cmd:
taskkill -f /pid 18932
21
This does not work for Windows users
– Hinrich
Jan 23 '17 at 8:49
1
While I realize that this is the correct solution, does this not seem to be a horrible solution? What if I want to runng serve
on a different directory? Doesn't make sense to kill the server this way and then restart it somewhere else or am I missing something?
– Nathan Dunn
May 2 '17 at 4:49
4
You can specify a different port with:--port <new_port>
– hestellez
Jun 10 '17 at 5:07
2
This kills the default browser. And not helpful.
– shijin
Jun 20 '17 at 13:08
4
this did murder my browser window. I figured it out eventually though... I had done a^Z
on an existing angular instance that was using the default port, silly me!
– tenCupMaximum
Jul 25 '17 at 1:56
|
show 3 more comments
up vote
133
down vote
accepted
This is what I used to kill the progress on port 4200
sudo kill $(sudo lsof -t -i:4200)
You could also try this:
sudo kill `sudo lsof -t -i:4200`
For windows users:
Port number 4200 is already in use. Type below command in cmd:
netstat -a -n -o
And then, find port with port number 4200 by right click on terminal and click find, enter 4200 in "find what" and click "find next":
Let say you found that port number 4200 is used by pid 18932. Type below command in cmd:
taskkill -f /pid 18932
21
This does not work for Windows users
– Hinrich
Jan 23 '17 at 8:49
1
While I realize that this is the correct solution, does this not seem to be a horrible solution? What if I want to runng serve
on a different directory? Doesn't make sense to kill the server this way and then restart it somewhere else or am I missing something?
– Nathan Dunn
May 2 '17 at 4:49
4
You can specify a different port with:--port <new_port>
– hestellez
Jun 10 '17 at 5:07
2
This kills the default browser. And not helpful.
– shijin
Jun 20 '17 at 13:08
4
this did murder my browser window. I figured it out eventually though... I had done a^Z
on an existing angular instance that was using the default port, silly me!
– tenCupMaximum
Jul 25 '17 at 1:56
|
show 3 more comments
up vote
133
down vote
accepted
up vote
133
down vote
accepted
This is what I used to kill the progress on port 4200
sudo kill $(sudo lsof -t -i:4200)
You could also try this:
sudo kill `sudo lsof -t -i:4200`
For windows users:
Port number 4200 is already in use. Type below command in cmd:
netstat -a -n -o
And then, find port with port number 4200 by right click on terminal and click find, enter 4200 in "find what" and click "find next":
Let say you found that port number 4200 is used by pid 18932. Type below command in cmd:
taskkill -f /pid 18932
This is what I used to kill the progress on port 4200
sudo kill $(sudo lsof -t -i:4200)
You could also try this:
sudo kill `sudo lsof -t -i:4200`
For windows users:
Port number 4200 is already in use. Type below command in cmd:
netstat -a -n -o
And then, find port with port number 4200 by right click on terminal and click find, enter 4200 in "find what" and click "find next":
Let say you found that port number 4200 is used by pid 18932. Type below command in cmd:
taskkill -f /pid 18932
edited Nov 19 '17 at 19:50
Rajat Surana
1006
1006
answered Aug 26 '16 at 15:34
Bart Hoekstra
1,88011012
1,88011012
21
This does not work for Windows users
– Hinrich
Jan 23 '17 at 8:49
1
While I realize that this is the correct solution, does this not seem to be a horrible solution? What if I want to runng serve
on a different directory? Doesn't make sense to kill the server this way and then restart it somewhere else or am I missing something?
– Nathan Dunn
May 2 '17 at 4:49
4
You can specify a different port with:--port <new_port>
– hestellez
Jun 10 '17 at 5:07
2
This kills the default browser. And not helpful.
– shijin
Jun 20 '17 at 13:08
4
this did murder my browser window. I figured it out eventually though... I had done a^Z
on an existing angular instance that was using the default port, silly me!
– tenCupMaximum
Jul 25 '17 at 1:56
|
show 3 more comments
21
This does not work for Windows users
– Hinrich
Jan 23 '17 at 8:49
1
While I realize that this is the correct solution, does this not seem to be a horrible solution? What if I want to runng serve
on a different directory? Doesn't make sense to kill the server this way and then restart it somewhere else or am I missing something?
– Nathan Dunn
May 2 '17 at 4:49
4
You can specify a different port with:--port <new_port>
– hestellez
Jun 10 '17 at 5:07
2
This kills the default browser. And not helpful.
– shijin
Jun 20 '17 at 13:08
4
this did murder my browser window. I figured it out eventually though... I had done a^Z
on an existing angular instance that was using the default port, silly me!
– tenCupMaximum
Jul 25 '17 at 1:56
21
21
This does not work for Windows users
– Hinrich
Jan 23 '17 at 8:49
This does not work for Windows users
– Hinrich
Jan 23 '17 at 8:49
1
1
While I realize that this is the correct solution, does this not seem to be a horrible solution? What if I want to run
ng serve
on a different directory? Doesn't make sense to kill the server this way and then restart it somewhere else or am I missing something?– Nathan Dunn
May 2 '17 at 4:49
While I realize that this is the correct solution, does this not seem to be a horrible solution? What if I want to run
ng serve
on a different directory? Doesn't make sense to kill the server this way and then restart it somewhere else or am I missing something?– Nathan Dunn
May 2 '17 at 4:49
4
4
You can specify a different port with:
--port <new_port>
– hestellez
Jun 10 '17 at 5:07
You can specify a different port with:
--port <new_port>
– hestellez
Jun 10 '17 at 5:07
2
2
This kills the default browser. And not helpful.
– shijin
Jun 20 '17 at 13:08
This kills the default browser. And not helpful.
– shijin
Jun 20 '17 at 13:08
4
4
this did murder my browser window. I figured it out eventually though... I had done a
^Z
on an existing angular instance that was using the default port, silly me!– tenCupMaximum
Jul 25 '17 at 1:56
this did murder my browser window. I figured it out eventually though... I had done a
^Z
on an existing angular instance that was using the default port, silly me!– tenCupMaximum
Jul 25 '17 at 1:56
|
show 3 more comments
up vote
107
down vote
Open your cmd.exe
as administrator
,
then Find the PID
of port 4200
netstat -ano | findstr :4200
Here i have 3 PID :
- Red one is from "ng-serve" (127.0.0.1:4200) that
LISTENING
- Green one is from "your browser"
kill only port 4200 (kill the red PID):
taskkill /PID 15940 /F
note : kill the green one will only lead your browser closed by force.
now you can do "ng-serve" to start your angular app at the same port 4200
Additional Stuff :
One liner : After looking a way to optimize this, Here is the One-liner command of this answer : (special thanks to : Josep Alsina for this tips)
for /f "tokens=5" %a in ('netstat -ano ^| find "4200" ^| find "LISTENING"') do taskkill /f /pid %a
5
Added one-line code for windows command prompt, thanks ^^.
– Anthony Kal
Jul 13 '17 at 3:36
2
Remember to do it incmd
, notGit Bash
.
– Leo
Nov 12 '17 at 0:30
1
Syntsax for GitBash on Windows netstat -ano | findstr :4200; taskkill -PID <establishedPID> -F
– intotecho
Mar 7 at 2:00
Updating GIt Bash fix my problem
– Ismail Farooq
Mar 20 at 6:43
This should be accepted as answer
– andrey.shedko
Nov 21 at 12:22
add a comment |
up vote
107
down vote
Open your cmd.exe
as administrator
,
then Find the PID
of port 4200
netstat -ano | findstr :4200
Here i have 3 PID :
- Red one is from "ng-serve" (127.0.0.1:4200) that
LISTENING
- Green one is from "your browser"
kill only port 4200 (kill the red PID):
taskkill /PID 15940 /F
note : kill the green one will only lead your browser closed by force.
now you can do "ng-serve" to start your angular app at the same port 4200
Additional Stuff :
One liner : After looking a way to optimize this, Here is the One-liner command of this answer : (special thanks to : Josep Alsina for this tips)
for /f "tokens=5" %a in ('netstat -ano ^| find "4200" ^| find "LISTENING"') do taskkill /f /pid %a
5
Added one-line code for windows command prompt, thanks ^^.
– Anthony Kal
Jul 13 '17 at 3:36
2
Remember to do it incmd
, notGit Bash
.
– Leo
Nov 12 '17 at 0:30
1
Syntsax for GitBash on Windows netstat -ano | findstr :4200; taskkill -PID <establishedPID> -F
– intotecho
Mar 7 at 2:00
Updating GIt Bash fix my problem
– Ismail Farooq
Mar 20 at 6:43
This should be accepted as answer
– andrey.shedko
Nov 21 at 12:22
add a comment |
up vote
107
down vote
up vote
107
down vote
Open your cmd.exe
as administrator
,
then Find the PID
of port 4200
netstat -ano | findstr :4200
Here i have 3 PID :
- Red one is from "ng-serve" (127.0.0.1:4200) that
LISTENING
- Green one is from "your browser"
kill only port 4200 (kill the red PID):
taskkill /PID 15940 /F
note : kill the green one will only lead your browser closed by force.
now you can do "ng-serve" to start your angular app at the same port 4200
Additional Stuff :
One liner : After looking a way to optimize this, Here is the One-liner command of this answer : (special thanks to : Josep Alsina for this tips)
for /f "tokens=5" %a in ('netstat -ano ^| find "4200" ^| find "LISTENING"') do taskkill /f /pid %a
Open your cmd.exe
as administrator
,
then Find the PID
of port 4200
netstat -ano | findstr :4200
Here i have 3 PID :
- Red one is from "ng-serve" (127.0.0.1:4200) that
LISTENING
- Green one is from "your browser"
kill only port 4200 (kill the red PID):
taskkill /PID 15940 /F
note : kill the green one will only lead your browser closed by force.
now you can do "ng-serve" to start your angular app at the same port 4200
Additional Stuff :
One liner : After looking a way to optimize this, Here is the One-liner command of this answer : (special thanks to : Josep Alsina for this tips)
for /f "tokens=5" %a in ('netstat -ano ^| find "4200" ^| find "LISTENING"') do taskkill /f /pid %a
edited Jul 13 '17 at 7:37
answered Mar 20 '17 at 4:59
Anthony Kal
1,2491911
1,2491911
5
Added one-line code for windows command prompt, thanks ^^.
– Anthony Kal
Jul 13 '17 at 3:36
2
Remember to do it incmd
, notGit Bash
.
– Leo
Nov 12 '17 at 0:30
1
Syntsax for GitBash on Windows netstat -ano | findstr :4200; taskkill -PID <establishedPID> -F
– intotecho
Mar 7 at 2:00
Updating GIt Bash fix my problem
– Ismail Farooq
Mar 20 at 6:43
This should be accepted as answer
– andrey.shedko
Nov 21 at 12:22
add a comment |
5
Added one-line code for windows command prompt, thanks ^^.
– Anthony Kal
Jul 13 '17 at 3:36
2
Remember to do it incmd
, notGit Bash
.
– Leo
Nov 12 '17 at 0:30
1
Syntsax for GitBash on Windows netstat -ano | findstr :4200; taskkill -PID <establishedPID> -F
– intotecho
Mar 7 at 2:00
Updating GIt Bash fix my problem
– Ismail Farooq
Mar 20 at 6:43
This should be accepted as answer
– andrey.shedko
Nov 21 at 12:22
5
5
Added one-line code for windows command prompt, thanks ^^.
– Anthony Kal
Jul 13 '17 at 3:36
Added one-line code for windows command prompt, thanks ^^.
– Anthony Kal
Jul 13 '17 at 3:36
2
2
Remember to do it in
cmd
, not Git Bash
.– Leo
Nov 12 '17 at 0:30
Remember to do it in
cmd
, not Git Bash
.– Leo
Nov 12 '17 at 0:30
1
1
Syntsax for GitBash on Windows netstat -ano | findstr :4200; taskkill -PID <establishedPID> -F
– intotecho
Mar 7 at 2:00
Syntsax for GitBash on Windows netstat -ano | findstr :4200; taskkill -PID <establishedPID> -F
– intotecho
Mar 7 at 2:00
Updating GIt Bash fix my problem
– Ismail Farooq
Mar 20 at 6:43
Updating GIt Bash fix my problem
– Ismail Farooq
Mar 20 at 6:43
This should be accepted as answer
– andrey.shedko
Nov 21 at 12:22
This should be accepted as answer
– andrey.shedko
Nov 21 at 12:22
add a comment |
up vote
46
down vote
On Mac OS X you need the following command:
sudo lsof -t -i tcp:4200 | xargs kill -9
Remember you need to kill Angular's web server with Command+C.
add a comment |
up vote
46
down vote
On Mac OS X you need the following command:
sudo lsof -t -i tcp:4200 | xargs kill -9
Remember you need to kill Angular's web server with Command+C.
add a comment |
up vote
46
down vote
up vote
46
down vote
On Mac OS X you need the following command:
sudo lsof -t -i tcp:4200 | xargs kill -9
Remember you need to kill Angular's web server with Command+C.
On Mac OS X you need the following command:
sudo lsof -t -i tcp:4200 | xargs kill -9
Remember you need to kill Angular's web server with Command+C.
answered Jun 20 '17 at 20:32
Julian Fraser
60045
60045
add a comment |
add a comment |
up vote
9
down vote
Not ctrl+Z,
you must run for stop ctrl+C
it's worked, I checking
by far the simplest solution to the problem, even if technically it does not respond to the OP question
– Flo
Nov 21 at 9:04
add a comment |
up vote
9
down vote
Not ctrl+Z,
you must run for stop ctrl+C
it's worked, I checking
by far the simplest solution to the problem, even if technically it does not respond to the OP question
– Flo
Nov 21 at 9:04
add a comment |
up vote
9
down vote
up vote
9
down vote
Not ctrl+Z,
you must run for stop ctrl+C
it's worked, I checking
Not ctrl+Z,
you must run for stop ctrl+C
it's worked, I checking
edited Sep 24 at 5:16
Rohit Sharma
2,21521027
2,21521027
answered Nov 7 '16 at 10:38
Emir Mamashov
25136
25136
by far the simplest solution to the problem, even if technically it does not respond to the OP question
– Flo
Nov 21 at 9:04
add a comment |
by far the simplest solution to the problem, even if technically it does not respond to the OP question
– Flo
Nov 21 at 9:04
by far the simplest solution to the problem, even if technically it does not respond to the OP question
– Flo
Nov 21 at 9:04
by far the simplest solution to the problem, even if technically it does not respond to the OP question
– Flo
Nov 21 at 9:04
add a comment |
up vote
8
down vote
Use this command to kill ng:
pkill -9 ng
add a comment |
up vote
8
down vote
Use this command to kill ng:
pkill -9 ng
add a comment |
up vote
8
down vote
up vote
8
down vote
Use this command to kill ng:
pkill -9 ng
Use this command to kill ng:
pkill -9 ng
answered Jun 12 at 17:13
Lolita
8111
8111
add a comment |
add a comment |
up vote
8
down vote
ng serve --port <YOUR_GIVEN_PORT_NUMBER>
You should try above command to run on your given port.
add a comment |
up vote
8
down vote
ng serve --port <YOUR_GIVEN_PORT_NUMBER>
You should try above command to run on your given port.
add a comment |
up vote
8
down vote
up vote
8
down vote
ng serve --port <YOUR_GIVEN_PORT_NUMBER>
You should try above command to run on your given port.
ng serve --port <YOUR_GIVEN_PORT_NUMBER>
You should try above command to run on your given port.
answered Jul 5 at 8:07
Shubham Verma
2,29712449
2,29712449
add a comment |
add a comment |
up vote
7
down vote
I also faced the same error msg, so i tried ng serve --port 12012 and it worked fine.
5
we cannot alot new port everytime.
– shijin
Jun 20 '17 at 13:09
7
Who is upvoting answers like these?
– shark1608
Nov 10 '17 at 17:55
add a comment |
up vote
7
down vote
I also faced the same error msg, so i tried ng serve --port 12012 and it worked fine.
5
we cannot alot new port everytime.
– shijin
Jun 20 '17 at 13:09
7
Who is upvoting answers like these?
– shark1608
Nov 10 '17 at 17:55
add a comment |
up vote
7
down vote
up vote
7
down vote
I also faced the same error msg, so i tried ng serve --port 12012 and it worked fine.
I also faced the same error msg, so i tried ng serve --port 12012 and it worked fine.
answered Dec 10 '16 at 7:48
Sachin Gaikwad
32529
32529
5
we cannot alot new port everytime.
– shijin
Jun 20 '17 at 13:09
7
Who is upvoting answers like these?
– shark1608
Nov 10 '17 at 17:55
add a comment |
5
we cannot alot new port everytime.
– shijin
Jun 20 '17 at 13:09
7
Who is upvoting answers like these?
– shark1608
Nov 10 '17 at 17:55
5
5
we cannot alot new port everytime.
– shijin
Jun 20 '17 at 13:09
we cannot alot new port everytime.
– shijin
Jun 20 '17 at 13:09
7
7
Who is upvoting answers like these?
– shark1608
Nov 10 '17 at 17:55
Who is upvoting answers like these?
– shark1608
Nov 10 '17 at 17:55
add a comment |
up vote
6
down vote
When you use Ctrl+Z
, you are going to suspend a running task but not to kill it. You can later use command fg
to resume the task.
If you want to quit ng serve
, you should use Ctrl+C
instead, in which will also release the 4200 port.
add a comment |
up vote
6
down vote
When you use Ctrl+Z
, you are going to suspend a running task but not to kill it. You can later use command fg
to resume the task.
If you want to quit ng serve
, you should use Ctrl+C
instead, in which will also release the 4200 port.
add a comment |
up vote
6
down vote
up vote
6
down vote
When you use Ctrl+Z
, you are going to suspend a running task but not to kill it. You can later use command fg
to resume the task.
If you want to quit ng serve
, you should use Ctrl+C
instead, in which will also release the 4200 port.
When you use Ctrl+Z
, you are going to suspend a running task but not to kill it. You can later use command fg
to resume the task.
If you want to quit ng serve
, you should use Ctrl+C
instead, in which will also release the 4200 port.
answered Oct 3 '17 at 17:01
Roman Lo
6112
6112
add a comment |
add a comment |
up vote
5
down vote
We can forcefully kill the port by following command.
kill -2 $(lsof -t -i:4200)
add a comment |
up vote
5
down vote
We can forcefully kill the port by following command.
kill -2 $(lsof -t -i:4200)
add a comment |
up vote
5
down vote
up vote
5
down vote
We can forcefully kill the port by following command.
kill -2 $(lsof -t -i:4200)
We can forcefully kill the port by following command.
kill -2 $(lsof -t -i:4200)
edited Jul 30 '17 at 0:01
Stephen Rauch
27.4k153156
27.4k153156
answered Jul 29 '17 at 23:37
sharath parupati
5111
5111
add a comment |
add a comment |
up vote
4
down vote
ng serve --port 4201 --live-reload-port 4200
and access using localhost:4201
This should work as a temporary solution.
or
try listing port usage usinglsof -i:4200
and kill it manually usingsudo kill -9 <Process PID using port 4200>
add a comment |
up vote
4
down vote
ng serve --port 4201 --live-reload-port 4200
and access using localhost:4201
This should work as a temporary solution.
or
try listing port usage usinglsof -i:4200
and kill it manually usingsudo kill -9 <Process PID using port 4200>
add a comment |
up vote
4
down vote
up vote
4
down vote
ng serve --port 4201 --live-reload-port 4200
and access using localhost:4201
This should work as a temporary solution.
or
try listing port usage usinglsof -i:4200
and kill it manually usingsudo kill -9 <Process PID using port 4200>
ng serve --port 4201 --live-reload-port 4200
and access using localhost:4201
This should work as a temporary solution.
or
try listing port usage usinglsof -i:4200
and kill it manually usingsudo kill -9 <Process PID using port 4200>
edited Jan 22 at 6:26
answered Jun 21 '17 at 6:21
shijin
1,47911218
1,47911218
add a comment |
add a comment |
up vote
3
down vote
For Windows:
Open Command Prompt and
type: netstat -a -o -n
Find the PID of the process that you want to kill.
Type: taskkill /F /PID 16876
This one 16876 - is the PID for the process that I want to kill - in that case, the process is 4200 - check the attached file.you can give any port number.
Now, Type : ng serve
to start your angular app at the same port 4200
add a comment |
up vote
3
down vote
For Windows:
Open Command Prompt and
type: netstat -a -o -n
Find the PID of the process that you want to kill.
Type: taskkill /F /PID 16876
This one 16876 - is the PID for the process that I want to kill - in that case, the process is 4200 - check the attached file.you can give any port number.
Now, Type : ng serve
to start your angular app at the same port 4200
add a comment |
up vote
3
down vote
up vote
3
down vote
For Windows:
Open Command Prompt and
type: netstat -a -o -n
Find the PID of the process that you want to kill.
Type: taskkill /F /PID 16876
This one 16876 - is the PID for the process that I want to kill - in that case, the process is 4200 - check the attached file.you can give any port number.
Now, Type : ng serve
to start your angular app at the same port 4200
For Windows:
Open Command Prompt and
type: netstat -a -o -n
Find the PID of the process that you want to kill.
Type: taskkill /F /PID 16876
This one 16876 - is the PID for the process that I want to kill - in that case, the process is 4200 - check the attached file.you can give any port number.
Now, Type : ng serve
to start your angular app at the same port 4200
edited Feb 14 at 10:52
answered Feb 14 at 10:42
Jay Kareliya
455419
455419
add a comment |
add a comment |
up vote
2
down vote
netstat -anp | grep ":4200"
This will tell you who's got the port.
is it - anp ? that returned nothing so I just added a space because your command was asking for "nestat: option requires an argument --p "
– peztherez
Aug 23 '16 at 3:38
Your netstat must be different from mine. Maybe add an OS tag.
– Joshua
Aug 23 '16 at 21:26
add a comment |
up vote
2
down vote
netstat -anp | grep ":4200"
This will tell you who's got the port.
is it - anp ? that returned nothing so I just added a space because your command was asking for "nestat: option requires an argument --p "
– peztherez
Aug 23 '16 at 3:38
Your netstat must be different from mine. Maybe add an OS tag.
– Joshua
Aug 23 '16 at 21:26
add a comment |
up vote
2
down vote
up vote
2
down vote
netstat -anp | grep ":4200"
This will tell you who's got the port.
netstat -anp | grep ":4200"
This will tell you who's got the port.
answered Aug 23 '16 at 3:26
Joshua
22.8k54798
22.8k54798
is it - anp ? that returned nothing so I just added a space because your command was asking for "nestat: option requires an argument --p "
– peztherez
Aug 23 '16 at 3:38
Your netstat must be different from mine. Maybe add an OS tag.
– Joshua
Aug 23 '16 at 21:26
add a comment |
is it - anp ? that returned nothing so I just added a space because your command was asking for "nestat: option requires an argument --p "
– peztherez
Aug 23 '16 at 3:38
Your netstat must be different from mine. Maybe add an OS tag.
– Joshua
Aug 23 '16 at 21:26
is it - anp ? that returned nothing so I just added a space because your command was asking for "nestat: option requires an argument --p "
– peztherez
Aug 23 '16 at 3:38
is it - anp ? that returned nothing so I just added a space because your command was asking for "nestat: option requires an argument --p "
– peztherez
Aug 23 '16 at 3:38
Your netstat must be different from mine. Maybe add an OS tag.
– Joshua
Aug 23 '16 at 21:26
Your netstat must be different from mine. Maybe add an OS tag.
– Joshua
Aug 23 '16 at 21:26
add a comment |
up vote
2
down vote
The most simple one line command:
sudo fuser -k 4200/tcp
add a comment |
up vote
2
down vote
The most simple one line command:
sudo fuser -k 4200/tcp
add a comment |
up vote
2
down vote
up vote
2
down vote
The most simple one line command:
sudo fuser -k 4200/tcp
The most simple one line command:
sudo fuser -k 4200/tcp
answered Jan 8 at 6:55
Salman Ahmed
151311
151311
add a comment |
add a comment |
up vote
1
down vote
You can also try with this to run your application in visual studio code -:
ng serve --open --port 4201
you can give any port number.
add a comment |
up vote
1
down vote
You can also try with this to run your application in visual studio code -:
ng serve --open --port 4201
you can give any port number.
add a comment |
up vote
1
down vote
up vote
1
down vote
You can also try with this to run your application in visual studio code -:
ng serve --open --port 4201
you can give any port number.
You can also try with this to run your application in visual studio code -:
ng serve --open --port 4201
you can give any port number.
answered Jan 4 at 6:54
HarmesH KaushiK
112
112
add a comment |
add a comment |
up vote
1
down vote
you can use fuser -k 4200/tcp if it is Linux Operating system
add a comment |
up vote
1
down vote
you can use fuser -k 4200/tcp if it is Linux Operating system
add a comment |
up vote
1
down vote
up vote
1
down vote
you can use fuser -k 4200/tcp if it is Linux Operating system
you can use fuser -k 4200/tcp if it is Linux Operating system
answered Apr 22 at 11:39
Machhindra Neupane
360210
360210
add a comment |
add a comment |
up vote
1
down vote
Kill process and close the terminal which you used for running the app on that port.
add a comment |
up vote
1
down vote
Kill process and close the terminal which you used for running the app on that port.
add a comment |
up vote
1
down vote
up vote
1
down vote
Kill process and close the terminal which you used for running the app on that port.
Kill process and close the terminal which you used for running the app on that port.
answered May 8 at 13:06
Gjorgi Gjorgiev
514
514
add a comment |
add a comment |
up vote
1
down vote
Instead of killing the whole process or using ctrl+z
, you can simply use ctrl+c
to stop the server and can happily use ng serve command
without any errors
or if you want to run on a different port simply use this command ng serve --port portno(ex: ng serve --port 4201)
.
add a comment |
up vote
1
down vote
Instead of killing the whole process or using ctrl+z
, you can simply use ctrl+c
to stop the server and can happily use ng serve command
without any errors
or if you want to run on a different port simply use this command ng serve --port portno(ex: ng serve --port 4201)
.
add a comment |
up vote
1
down vote
up vote
1
down vote
Instead of killing the whole process or using ctrl+z
, you can simply use ctrl+c
to stop the server and can happily use ng serve command
without any errors
or if you want to run on a different port simply use this command ng serve --port portno(ex: ng serve --port 4201)
.
Instead of killing the whole process or using ctrl+z
, you can simply use ctrl+c
to stop the server and can happily use ng serve command
without any errors
or if you want to run on a different port simply use this command ng serve --port portno(ex: ng serve --port 4201)
.
edited Aug 23 at 9:46
answered Apr 2 at 4:21
Alekya
11910
11910
add a comment |
add a comment |
up vote
1
down vote
With ctrl + z you put the program in the background.
On Linux you can get the session back in the foreground with the following command:
fg ng serve
You don't need to kill the process.
add a comment |
up vote
1
down vote
With ctrl + z you put the program in the background.
On Linux you can get the session back in the foreground with the following command:
fg ng serve
You don't need to kill the process.
add a comment |
up vote
1
down vote
up vote
1
down vote
With ctrl + z you put the program in the background.
On Linux you can get the session back in the foreground with the following command:
fg ng serve
You don't need to kill the process.
With ctrl + z you put the program in the background.
On Linux you can get the session back in the foreground with the following command:
fg ng serve
You don't need to kill the process.
answered Nov 14 at 11:42
Spirit
657
657
add a comment |
add a comment |
up vote
0
down vote
If you compiling your angular JS code in both CMD and IDE then this issue occur. In CMD, your angular JS code compile automatically whenever you change your angular JS code in IDE and then your IDE want to occupy the same port i.e 4200 which is occupied by CMD already
So, there is a simple solution for this issue, just close your cmd while compiling your code in IDE.
add a comment |
up vote
0
down vote
If you compiling your angular JS code in both CMD and IDE then this issue occur. In CMD, your angular JS code compile automatically whenever you change your angular JS code in IDE and then your IDE want to occupy the same port i.e 4200 which is occupied by CMD already
So, there is a simple solution for this issue, just close your cmd while compiling your code in IDE.
add a comment |
up vote
0
down vote
up vote
0
down vote
If you compiling your angular JS code in both CMD and IDE then this issue occur. In CMD, your angular JS code compile automatically whenever you change your angular JS code in IDE and then your IDE want to occupy the same port i.e 4200 which is occupied by CMD already
So, there is a simple solution for this issue, just close your cmd while compiling your code in IDE.
If you compiling your angular JS code in both CMD and IDE then this issue occur. In CMD, your angular JS code compile automatically whenever you change your angular JS code in IDE and then your IDE want to occupy the same port i.e 4200 which is occupied by CMD already
So, there is a simple solution for this issue, just close your cmd while compiling your code in IDE.
answered Aug 9 '17 at 18:24
vishal
1
1
add a comment |
add a comment |
up vote
0
down vote
I was facing the same issue every time I have to kill the port.
I tried ./node_modules/.bin/ng serve --proxy-config proxy.conf.json --host 0.0.0.0
Instead of npm start
and its works
add a comment |
up vote
0
down vote
I was facing the same issue every time I have to kill the port.
I tried ./node_modules/.bin/ng serve --proxy-config proxy.conf.json --host 0.0.0.0
Instead of npm start
and its works
add a comment |
up vote
0
down vote
up vote
0
down vote
I was facing the same issue every time I have to kill the port.
I tried ./node_modules/.bin/ng serve --proxy-config proxy.conf.json --host 0.0.0.0
Instead of npm start
and its works
I was facing the same issue every time I have to kill the port.
I tried ./node_modules/.bin/ng serve --proxy-config proxy.conf.json --host 0.0.0.0
Instead of npm start
and its works
answered Oct 24 '17 at 6:39
Ismail Farooq
3,81211534
3,81211534
add a comment |
add a comment |
up vote
0
down vote
On linux mint 17, this is working.
kill -9 $(lsof -t -i:4200)
add a comment |
up vote
0
down vote
On linux mint 17, this is working.
kill -9 $(lsof -t -i:4200)
add a comment |
up vote
0
down vote
up vote
0
down vote
On linux mint 17, this is working.
kill -9 $(lsof -t -i:4200)
On linux mint 17, this is working.
kill -9 $(lsof -t -i:4200)
answered Feb 19 at 13:41
zerre
268
268
add a comment |
add a comment |
up vote
0
down vote
It is possible to change port in .angular-cli
file. For example:
"defaults": {
"styleExt": "css",
"component": {},
"serve": {
"port": 4205
}
}
In addition, it is necessary to add this to your package.json
:
"ng": "ng",
"start": "ng serve"
add a comment |
up vote
0
down vote
It is possible to change port in .angular-cli
file. For example:
"defaults": {
"styleExt": "css",
"component": {},
"serve": {
"port": 4205
}
}
In addition, it is necessary to add this to your package.json
:
"ng": "ng",
"start": "ng serve"
add a comment |
up vote
0
down vote
up vote
0
down vote
It is possible to change port in .angular-cli
file. For example:
"defaults": {
"styleExt": "css",
"component": {},
"serve": {
"port": 4205
}
}
In addition, it is necessary to add this to your package.json
:
"ng": "ng",
"start": "ng serve"
It is possible to change port in .angular-cli
file. For example:
"defaults": {
"styleExt": "css",
"component": {},
"serve": {
"port": 4205
}
}
In addition, it is necessary to add this to your package.json
:
"ng": "ng",
"start": "ng serve"
answered Mar 6 at 11:11
StepUp
6,68774472
6,68774472
add a comment |
add a comment |
up vote
0
down vote
It says already we are running the services with port no 4200 please use another port instead of 4200. Below command is to solve the problem
ng serve --port 4300
add a comment |
up vote
0
down vote
It says already we are running the services with port no 4200 please use another port instead of 4200. Below command is to solve the problem
ng serve --port 4300
add a comment |
up vote
0
down vote
up vote
0
down vote
It says already we are running the services with port no 4200 please use another port instead of 4200. Below command is to solve the problem
ng serve --port 4300
It says already we are running the services with port no 4200 please use another port instead of 4200. Below command is to solve the problem
ng serve --port 4300
edited Mar 19 at 9:17
rollstuhlfahrer
3,24781831
3,24781831
answered Mar 19 at 9:01
dharma rao Palli
92
92
add a comment |
add a comment |
up vote
0
down vote
Port 4200 is already in use. Use '--port' to specify a different port
This means that you already have another service running on port 4200. If this is the case
you can either . shut down the other service. use the --port
flag when running ng
serve like this:
ng serve --port 9001
Another thing to notice is that, on some machines, the domain localhost may not work.
You may see a set of numbers such as 127.0.0.1. When you run ng serve it should show
you what URL the server is running on, so be sure to read the messages on your machine
to find your exact development URL.
add a comment |
up vote
0
down vote
Port 4200 is already in use. Use '--port' to specify a different port
This means that you already have another service running on port 4200. If this is the case
you can either . shut down the other service. use the --port
flag when running ng
serve like this:
ng serve --port 9001
Another thing to notice is that, on some machines, the domain localhost may not work.
You may see a set of numbers such as 127.0.0.1. When you run ng serve it should show
you what URL the server is running on, so be sure to read the messages on your machine
to find your exact development URL.
add a comment |
up vote
0
down vote
up vote
0
down vote
Port 4200 is already in use. Use '--port' to specify a different port
This means that you already have another service running on port 4200. If this is the case
you can either . shut down the other service. use the --port
flag when running ng
serve like this:
ng serve --port 9001
Another thing to notice is that, on some machines, the domain localhost may not work.
You may see a set of numbers such as 127.0.0.1. When you run ng serve it should show
you what URL the server is running on, so be sure to read the messages on your machine
to find your exact development URL.
Port 4200 is already in use. Use '--port' to specify a different port
This means that you already have another service running on port 4200. If this is the case
you can either . shut down the other service. use the --port
flag when running ng
serve like this:
ng serve --port 9001
Another thing to notice is that, on some machines, the domain localhost may not work.
You may see a set of numbers such as 127.0.0.1. When you run ng serve it should show
you what URL the server is running on, so be sure to read the messages on your machine
to find your exact development URL.
answered Apr 22 at 10:31
Mohammad Daliri
439616
439616
add a comment |
add a comment |
up vote
0
down vote
netstat -plnet
tcp 0 0 127.0.0.1:4200 0.0.0.0:* LISTEN 1001 63955 7077/ng
kill -9 7077
again start your ng serve.
1
While this code snippet may solve the question, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, this reduces the readability of both the code and the explanations!
– Filnor
Jun 8 at 6:06
add a comment |
up vote
0
down vote
netstat -plnet
tcp 0 0 127.0.0.1:4200 0.0.0.0:* LISTEN 1001 63955 7077/ng
kill -9 7077
again start your ng serve.
1
While this code snippet may solve the question, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, this reduces the readability of both the code and the explanations!
– Filnor
Jun 8 at 6:06
add a comment |
up vote
0
down vote
up vote
0
down vote
netstat -plnet
tcp 0 0 127.0.0.1:4200 0.0.0.0:* LISTEN 1001 63955 7077/ng
kill -9 7077
again start your ng serve.
netstat -plnet
tcp 0 0 127.0.0.1:4200 0.0.0.0:* LISTEN 1001 63955 7077/ng
kill -9 7077
again start your ng serve.
answered Jun 8 at 5:53
Hacker Jarvis
1
1
1
While this code snippet may solve the question, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, this reduces the readability of both the code and the explanations!
– Filnor
Jun 8 at 6:06
add a comment |
1
While this code snippet may solve the question, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, this reduces the readability of both the code and the explanations!
– Filnor
Jun 8 at 6:06
1
1
While this code snippet may solve the question, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, this reduces the readability of both the code and the explanations!
– Filnor
Jun 8 at 6:06
While this code snippet may solve the question, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, this reduces the readability of both the code and the explanations!
– Filnor
Jun 8 at 6:06
add a comment |
up vote
0
down vote
In Windows; In command prompt which is running your ng serve just click and press keys:
ctrl + c
It will ask you: Terminate batch job (Y/N)?
and you type Y
add a comment |
up vote
0
down vote
In Windows; In command prompt which is running your ng serve just click and press keys:
ctrl + c
It will ask you: Terminate batch job (Y/N)?
and you type Y
add a comment |
up vote
0
down vote
up vote
0
down vote
In Windows; In command prompt which is running your ng serve just click and press keys:
ctrl + c
It will ask you: Terminate batch job (Y/N)?
and you type Y
In Windows; In command prompt which is running your ng serve just click and press keys:
ctrl + c
It will ask you: Terminate batch job (Y/N)?
and you type Y
answered Jul 2 at 23:52
Sharif Yazdian
17028
17028
add a comment |
add a comment |
up vote
0
down vote
As first step after any changes, I use ng build
, then ng serve
. It works without any problems.
add a comment |
up vote
0
down vote
As first step after any changes, I use ng build
, then ng serve
. It works without any problems.
add a comment |
up vote
0
down vote
up vote
0
down vote
As first step after any changes, I use ng build
, then ng serve
. It works without any problems.
As first step after any changes, I use ng build
, then ng serve
. It works without any problems.
answered Jul 5 at 8:02
Lena Neumann
1
1
add a comment |
add a comment |
up vote
0
down vote
Just restart the IDE you are using, then it will work.
add a comment |
up vote
0
down vote
Just restart the IDE you are using, then it will work.
add a comment |
up vote
0
down vote
up vote
0
down vote
Just restart the IDE you are using, then it will work.
Just restart the IDE you are using, then it will work.
answered Aug 13 at 15:51
aldo
4318
4318
add a comment |
add a comment |
up vote
0
down vote
Only thing that works for me is to restart my system / device...
Using Webstorm IDE by JetBrains.
add a comment |
up vote
0
down vote
Only thing that works for me is to restart my system / device...
Using Webstorm IDE by JetBrains.
add a comment |
up vote
0
down vote
up vote
0
down vote
Only thing that works for me is to restart my system / device...
Using Webstorm IDE by JetBrains.
Only thing that works for me is to restart my system / device...
Using Webstorm IDE by JetBrains.
edited Aug 14 at 7:01
answered Aug 2 at 11:12
Rick
67611022
67611022
add a comment |
add a comment |
up vote
0
down vote
To Access project outside localhost
Example:
ng serve --host 192.168.2.2:7006
add a comment |
up vote
0
down vote
To Access project outside localhost
Example:
ng serve --host 192.168.2.2:7006
add a comment |
up vote
0
down vote
up vote
0
down vote
To Access project outside localhost
Example:
ng serve --host 192.168.2.2:7006
To Access project outside localhost
Example:
ng serve --host 192.168.2.2:7006
answered Aug 28 at 11:37
Dibish
2,560114078
2,560114078
add a comment |
add a comment |
1 2
next
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39091735%2fport-4200-is-already-in-use-when-running-the-ng-serve-command%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown