The Managing packages with Npm challenge is broken


So I just began the challenge on packages and npm,
I open glitch, I add an author line and when trying to run the test on the first exercise I get this error

Unexpected token < in JSON at position 0

I haven’t done anyhting wrong. What do you guys think about it ?
There are a lot of errors in the console even before I touch anyhting.

Not sure what the challenge is or how the code looks. But these type of errors are usually because there is some symbol in the code that shouldn’t be there. In this case there is a “<” at position 0 in the JSON file you are loading, which makes it falter.

Hey thanks for your answer, however position 0 doesn’t exist…

I think it is because I’m sending the wrong URL to the challenge page for checking, however I don’t really understand which page I should send instead.

I’m copy pasting the glitch URL

“Position 0” means the first character.

Make sure that you are using the public link, not the edit link.

When you get that error, what it means is that it’s tried to parse a file in JSON format and has failed because it isn’t valid JSON. Position 0 is the first character. The first character of an HTML file is always going to be <, so instead of somefile.json, you’ve got somefile.html. So either the URL points to an HTML file, or the URL is giving you a server error page (which will also be an HTML file).

1 Like

Share->Link to Glitch->Live App gave me the right link.