This error occured when using the http-server to run production builds of angular on a local machine.

Solution one

Restart your computer, really :). The error means there is some process running already and you're probably here because you can't find it. Restart your machine will kill the process.

Solution two

The solution is to clear your entire npm cache and folders (yeah, pretty lame). I could not found another answer (yet):

rm -rf node_modules
npm cache clear --force
npm install

 

Tags