Unexpected Token < in APIs and Microservices Project 1st Challenge

I’ve added the author: name key value pair, tried every link available using the share button (project, app, code) as well as trying the actual URL to the page. Still getting Unexpected token < in JSON at position 0. Also have started a new Glitch project 3 times as I read that occasionally default wouldn’t render correctly, as well as disabling all Ublock and Privacy Badger thinking it could be a scripting issue.

Can’t link glitch because I haven’t used the forum enough apparently. So here’s it spelled out: www glitch dot com/~grizzled-cardigan
Copy of package.json:

{
“//1”: “describes your app and its dependencies”,
“//2”: “”,
“//3”: “updating this file will download and update your packages”,
“name”: “hello-express”,
“version”: “0.0.1”,
“author”: “Colin F.”,
“description”: “A simple Node app built on Express, instantly up and running.”,
“main”: “server.js”,
“scripts”: {
“start”: “node server.js”
},
“dependencies”: {
“express”: “^4.16.4”
},
“engines”: {
“node”: “8.x”
},
“repository”: {
“url”: “cant link due to security reasons on forum
},
“license”: “MIT”,
“keywords”: [
“node”,
“glitch”,
“express”
]
}

I think it is because you are linking to the JSON file. When I do that it responds with a webpage and I think the Unexpected token < is the start of the doctype declaration of the page.

Did you use this link to start the challenge? Are you logging in to glitch before starting?

  1. Login to glitch.

  2. Use the link I gave above.

  3. Add the author.

  4. Link to the glitch page (Your App page) in the solution box.

If you have the right page it should say this on it when you open it.

Manage Node.js projects and npm packages using package.json
Part 1 of Free Code Camp Backend Challenges

1 Like

Huh, that completely fixed the issue thanks so much. I definitely see now that I was creating projects without importing the boilerplate from github, though I’m still not sure how I managed to click the link the first time around and ended up with a different json file, but it works now!! Thanks!!!

Good to hear it worked. Happy coding.

Thanks! Resolved my issue as well. Logging into Glitch with my github account helped. Had previously used Google.