Project won't start

Hey there,
My project works as a backend in the console but the content is never served. It just hangs at:

Starting ...

To keep Glitch fast for everyone, inactive projects go to sleep and wake up on request.


EDIT: Link is not correct above. Correct link:!/mongo-atlas-mongoose


I’ve also checked via http, just in case it was something related to the certificate, and got the same result. Can someone help, please?

Hi, welcome to the comunity! The project link is indeed not starting, but the editor link is wrong, can you post a updated version? Or if the project is private, do you have any errors in the console?

1 Like

Hey @CodingEngineer ,
yes… aparently there is something wrong in this forum with escaping the #! in the link. Can’t figure out a way to properly show the link as a link in the comment above!/mongo-atlas-mongoose

EDIT: I also tried to fetch the app via its external IP and start the app via console to see if it is in fact serving the API route but I can’t seem to reach it that way either…

@gpedro34 I have a similar problem in another project and I remixed your project and tried several things but none worked, it looks like a problem in the packages but I will keep trying, if I got some result I will post here.

1 Like

I had some trouble with the npm installer in the UI and the way I got to solve it was by editing the package.json using nano via console and then running refresh. Is this bad pratice?

I thought glitch used containers and reinstalled the project modules on each restart. Is this assumption incorect?

I’m really new to glitch platform so sorry for the newbie questions… :smiley:

@gpedro34 Those are not newbie question, I don’t know the answer for some those answers. I am not from staff and when I need to install a package a I just insert a new line in package.json file, but I don’t know, you should ask a member from staff…

Thank you anyway… Please let me know if you find a solution either way :wink:

I considered them newbie questions for the platform itself as it is kind of the base of the entire thing works around here but I get your point, hopefully someone from the staff will be kind enough to get me those answers and help us figure it out…

Hey @gpedro34, welcome to the Glitch forum!

In this case the issue is that your project never starts the Express app’s listener; you need something like the last section from what I posted in project appears down even though not - Uptime robot to get your project to listen for incoming web connections.

Regarding your other questions, I typically edit package.json by hand in the Editor, which allows you to skip the refresh step in most cases, but you should be able to use the package picker there as well; if you’re having trouble with that some additional info regarding your browser environment and any errors you see would be helpful for us to take a look. And yes, Glitch will run through the install process for every cold restart but running refresh doesn’t trigger that; if you edit your package.json outside of the Editor you might use enable-pnpm instead of refresh to ensure an install.

Hope this helps!

1 Like

Thank you @cori! That was in fact the problem…
And thank you for the explanation :wink:

Don’t you, by any chance, know why freeCodeCamp keeps saying my app is not connected to MongoDB when in fact it is? The challenge on FCC is to just setup mongoose and that’s it.

If i try with!/mongo-atlas-mongoose

// running tests
Unexpected token < in JSON at position 0
mongoose is not connected
Unexpected token < in JSON at position 0
// tests completed

If I try with

// running tests
// tests completed

Neither of the links complete any test at all and I’m getting the feeling they are not seeing the same application I do…

@cori I just found this older post and I think this may be related to the issue I am having. Although I think it is either FCC or Glitch issue since it happens in both Chrome 76.0.3809.87 and Firefox 68.0.1 with JS enabled.

Go to the FCC challenge webpage, look at the network tab in Chrome Dev Tools, clean the network log and try submitting!/mongo-atlas-mongoose and if you see the same as I do you should see 3 network calls that got to /edit and their preview is To use Glitch, please enable JavaScript

Hey @gpedro34, what freeCodeCamp is seeing is the <noscript> content from our Editor, which does require javascript. I don’t know how the FCC test submission is supposed to work, but that part of Glitch hasn’t changed for at least a month, so that might be a question for the folks over at FCC.

1 Like

Sorry for the late reply but I was out for the weekend. I have now completed the challenge with a different project.

Turns out that even if my code was working, I was not using the right starter boilerplate to begin with and therefore the tests were erroring.

For any other Free Code Campers searching for the same issue I was having this is the starter project you should be using for this particular challenge.

Thanks for all the help @cori. You are awesome!

1 Like

Glad you got it sorted, and thanks for the tip for future searchers!