googledatalab / datalab

Interactive tools and developer experiences for Big Data on Google Cloud Platform.
Apache License 2.0
974 stars 249 forks source link

GCloud Shell Web preview says "Couldn't connect to a server on port 8080" #2176

Open trodney3 opened 3 years ago

trodney3 commented 3 years ago

I am attempting to complete the initial setup of React through CS-and-the-City curriculum with my students (https://github.com/upperlinecode/CS-and-the-City-Curriculum/blob/master/react/react-setup.md). Everything goes well and I even entered npm install -g npm for the patches as well as npm audit fix which found 0 out of 0 vulnerabilities.

My real issue is when we try to preview the code (preview on port 8080) I receive a new window with the message "Couldn't connect to a server on port 8080".

I tried opening another cloudshell command window and entered curl -i http://localhost:8080/ and received the following: curl: (7) Failed to connect to localhost port 8080: Connection refused

I turned off my VPN, I turned off my firewall completely, I changed the port. My students who are working remotely from their home also receive the same error. I don't know what else to do.

trodney3 commented 3 years ago

Figured it out facepalm Once you enter npm start, it returns the port you need to use in order to preview. Now I am receiving an error that it failed to compile because the ./logo.svg module could not be found.