How to Use package.json Challenge Help!

I have found a solution:

The short and narrow is that the server.js code is wrong… it doesn’t have the correct endpoint. The interesting thing is why? As the project is correct when you clone it.

I think its an issue with the cloning process… sometimes it can fail, and when that happens you get the default glitch project, rather than the backend boilerplate you were meant to be cloning.

In the scenario where it does fail and you have the stock glitch project… the server.js code is invalid, so you get these 404 errors when you submit the project for testing on FCC.

If you successfully clone the project then the server.js code is correct (has an endpoint for serving the package.json file) and everything works.

Basically… try and clone the project again from this link:
Glitch: The friendly community where everyone builds the web

…and before you submit check the server.js code for this get route: app.route('/_api/package.json')

4 Likes