Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

2.7K
Visualizações
ng server - listen EACCES: permission denied 127.0.0.1:4200

I have no problem in do ng serve using 127.0.0.1:4200.

But today, when I do ng serve An unhandled exception occurred: listen EACCES: permission denied 127.0.0.1:4200

Is there a way to solve this problem permanently?

over 4 years ago · Santiago Trujillo
8 Respostas
Responde à pergunta

0

For me is the Microsoft Wi-Fi Direct Virtual which enables by "Screen mirroring and projecting to your PC" Settings.

Just set "Always available" to "Always close" fix it.

over 4 years ago · Santiago Trujillo Relatório

0

  1. check might port already allocated for another application.

netstat -ano | findstr "4200"

  1. If you are using Docker might docker allocated this port (stop docker)

  2. Final solution restarting PC

over 4 years ago · Santiago Trujillo Relatório

0

For me happens after Windows 10 Update to build 2009.

There is a network adapter which is blocking your port.

For @p90n33r was Hyper-V.

For me was Wifi adapter before I use ethernet port.

Try disable any adapters to test it.

No restart needed.

over 4 years ago · Santiago Trujillo Relatório

0

I have solved this issue by simply going to Control Panel\Network and Internet\Network Connections and then I disabled all the Hyper-V Connections/Adapters and I kept the ones I use like the Wifi and Physical Ethernet Adapter.

No restart needed. Once done, try to run your Angular app on 4200 and it should work.

UPDATE

Alternative Solutions:

Sometimes just restarting Windows NAT driver can fix the issue:

  • open CMD/PowerShell and type net stop winnat and then net start winnat.

If that did not help then, try to stop the Windows NAT Driver and update the excludedportrange as follows :

  • type netsh int ipv4 add excludedportrange protocol=tcp startport=4200 numberofports=1 if you want to exclude port 4200 only if you want more just update numberofports
  • then start the Windows NAT Driver again and run your App.
over 4 years ago · Santiago Trujillo Relatório

0

It sounds like your port is taken already.

You should kill the use in port 4200.

over 4 years ago · Santiago Trujillo Relatório

0

I had the same error, also after rebooting several times. No application using the port. Finally a brainwave to turn off "Azure VPN", which we use locally to connect to our Cloud Network.

So if someone else bumbs into this error: Turn off "Azure VPN" and see if that is the issue. I don't know how to fix it keeping it on.

over 4 years ago · Santiago Trujillo Relatório

0

This happens to me while trying to run 2 Angular apps at the same time. So they both targetted 4200 port. I can recommend two solutions.

  1. Restart the PC. Very simple.
  2. Use a different port for ng serve -o

You can modify the package.json file's start section as ng serve -o --port 4401 to make it permanent. (Any port number will do the trick) and on the terminal just execute the command to run the app as npm start

enter image description here

over 4 years ago · Santiago Trujillo Relatório

0

If you are on a Mac machine and see this type of error, then try running your command with an elevated access.
This can be done by prepending sudo before your command.

For eg: sudo npm start or sudo ng serve, etc.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda