Cloud9 with Gulp & Browser-Sync....cannot GET / error? Can't figure it out

As the title says, I’m getting a cannot GET / error when trying to use my gulp/browser-sync setup on cloud9. The file works just fine on my local machine/editor, but I moved a copy to cloud9 so I can work on my project during down time at work. Cannot for the life of me figure out why I’m getting this error…I think I’m pointing everything to the right location, but clearly something’s still wrong. I’ve included a link to a photo with my file structure and the gulp file of my project…if anyone could help me figure out what I’m missing it would be greatly appreciated!!

Gulp file on cloud9

In your browser? If so, did you try adding index.html (http://localhost:3000/index.html)?

Yep, it’s the browser showing me that. My terminal shows that browser-sync and the watch function in my gulp file are both working, and they’re updating when I save changes. Just can’t see the actual browser page.

I tried the localhost:3000/index.html and it’s telling me it can’t be reached, localhost refused to connect. If I try to use the external link that the console gives me (http://http://172.17.0.125:3000/) it takes too long to connect and so won’t connect. same on that if I try adding the index.html to the end of the path.

You could try using port 8082
https://c9.io/blog/browsersync-gulp-js-cloud9/

8082 doesn’t seem to be working either…neither does 8080. I found that article the other day and tried it exactly like they say and it didn’t work, though I can’t remember exactly what result it gave me…just that it still wasn’t loading right. Attempted it again just now and I’m getting all sorts of weird errors in my terminal, first that all the ports were busy (so I restarted all the terminals), now that browser-sync isn’t a function so it can’t run it, something about not being able to get ‘on’ of undefined, but looking in my files where it says there’s nothing called on at all, so no clue what that is…I might just have something messed up in my node modules and need to just remove them all and try a fresh install.

I’d honestly be okay without using these, but doing the basic run function in cloud9 only shows my index page, it doesn’t apply any of my styles or my scripts from my other two files…maybe I’ve been missing something there and can look that route.

Hey Ben, thanks for your help yesterday. I ended up scrapping the whole workspace, making a new one, deleting everything that came preinstalled in it, updating the node version to the newest one, and putting my main index/css/js files into the root folder. Got the run instance built into cloud9 and finally got it all to display correctly. I have a feeling, being in the main root/workspace, the gulp/browser-sync stuff would work now too, though I haven’t tried it yet since the run is working. Just wanted to say I got it going and thank you for trying to help me figure it out!

1 Like