'listen EACCES: permission denied 127.0.0.1:80 - macOS
I need to serve an angular app with specific --host flag and --port 80. I added the host to my /etc/hosts file but when i use command "ng serve --host local.xxx.xxx --port 80", it says this :
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
An unhandled exception occurred: listen EACCES: permission denied 127.0.0.1:80
See "/private/var/folders/vs/dflrxx851ds_nd29vrsw6t6r0000gn/T/ng-kMuSPm./angular-errors.log" for further details.
Log contains of this :
[error] Error: listen EACCES: permission denied 127.0.0.1:80
at Server.setupListenHandle [as _listen2] (node:net@1363:21)
at listenInCluster (node:net:1428:12)
at GetAddrInfoReqWrap.doListen [as callback] (node:net:1567:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:85:8)
Please note that it needs to be port 80. I can't serve it on another port because of CORS policy.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
