Preview won't work - "Could not find an open port"


When working locally outside of Cloud9 I would use npm run start && open http://localhost:3000 to run my NodeJs app locally. How to get it to work in Cloud9 IDE?

If I run npm run start in Cloud9 and then go to, I get the error:
“Invalid Host header”. Therefore, based on the instructions here I first define the host and port:

  1. export HOST=$C9_HOSTNAME && export PORT=8080
  2. npm run start

This however still generates an error:

Could not find an open port at
Network error message: listen EADDRNOTAVAIL

I understand from here that 8080 is the right port. Or has this changed? I’ve also tried ports 8081 and 8082 but with the same result. What am I doing wrong?


Anyone?? I effectively can’t use Cloud9 as it is now… :frowning: