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.
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.
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).