Wednesday, 19 December 2018

Cloud9: Could not find an open port

I'm new to NodeJS and trying to set up an existing project (developed by someone else) in Cloud9 IDE (I'm using an older Cloud9 account; so not running on AWS). I've pulled the git and installed everything. This all seemed to go without problems.

To run the app locally, outside of Cloud9, you would start the server with npm run start (I know from the person who developed the app, this works for him). But I want to set it up in Cloud9, and in Cloud9 it is necessary to set some variables first (if I don't define the host first, it gives the error "Invalid Host header"). Therefore, I use the following two commands:

export HOST=$C9_HOSTNAME && export PORT=8080
npm run start

This produces the error:

Could not find an open port at appname-username.c9users.io.

Network error message: listen EADDRNOTAVAIL 35.189.252.103

I believe I have the port correct, considering https://docs.c9.io/docs/run-an-application. I’ve also tried the values 8081, 8082 and $PORT but none of these work.

Any ideas how I could get the app running locally?



from Cloud9: Could not find an open port

No comments:

Post a Comment