hello, sorry about that,
the exact page i am trying to complete is here
the package.json file on glitch that i am pasting is her
the message i am getting returned is:
“…package.json should have a valid “author” key…”
(I tried adding a version and still getting same returned result).
It’s not a beta bug, you haven’t included an “author” key, it’s required in package.json. Once you add it in you should be good. Also include a “version” key.
Solved it. Turns out that the URL isn’t that of the editor, but that of the app. I.e. open the app by clicking the sunglasses icon on the top left, then copy that URL.
I’m still having this problem. I’ve edited the package.json file as required (add an author key) on Glitch, and pasted in the app URL into the ‘Submit Solution’, and all I get is:
// running test
// tests completed
While the “package.json should have a valid “author” key” still shows an X next to it.
Note: the next lesson (add a description) also fails in the same way, when the default forked app from Glitch already contains a description key.
I cant proceed with the validation still.
I used the App URL too and event copied the above code, it just doesn’t validate my answer and show me “package.json should have a valid ‘author’ key”.
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.
Your package.json file is fine, but the freeCodeCamp automated test needs a way to actually read that file to check it. It’s easy to miss but on the Introduction to the Managing Packages with npm Challenges page it instructs you to clone either this Glitch project or this GitHub repo which have a server.js file that creates an api route that sends the package.json file when requested. On line 27 of server.js it defines what happens when a GET http request is sent to the route ‘/_api/package.json’; in this case the server sends the package.json file as a text string, which is what allows the automated test to view your package.json and verify you’ve made the correct changes.
What are you submitting as a solution? Your GitHub link? I don’t think the freeCodeCamp automated test is configured to be able to read that. It’s looking to go to the link you provide + ‘/_api/package.json’ and receive a text string of just the package.json file. The code in server.js accomplishes this, but that code must be running as a Node.js server somewhere: Glitch.com will not only host your code with an editor but run it for you on their servers (click the Show button on the top left for a link to the generated url running the code), while GitHub is just hosting the text files in its own format.