Stuck on Packages Certification test

Tell us what’s happening:

This should be a very simple ask but it keeps telling me my JSON isn’t formatted properly which I’m very sure it is. It’s saying there is no author. Where clearly there is. I’ve tried submitting the front page and the package.json directly. No idea what I’m doing wrong.

Your project link(s)

solution: https://rentalportal.github.io/boilerplate-npm

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 13597.105.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.208 Safari/537.36.

Challenge: How to Use package.json, the Core of Any Node.js Project or npm Package

Link to the challenge:

Hello there,

Where are you hosting your app?

If you are hosting it on GitHub pages, then the app will not work, because the tests require a fullstack application with a hosted backend.

Hope this clarifies

Shaun,
Thanks for your reply. I can put the packages file on a webserver i own, but I’m a little unclear exactly what it needs from the stack. Can you provide more detail to make sure I get it right?

Luke

Right. Throughout the backend challenges, the tests require:
a) A live app to target/request (not a link to code/text)
b) A live backend to host/route (somewhere a node/express server can live

The tests need to be able to take the URL to a Live App: https://example.com
Then, they will request from predefined endpoints: https://example.com/api/test

If you are unsure how to do this, that is why the Replit link is provided to start an in-browser editor, where you can work on, and host your app.

Hope this clarifies

I also tried it on Replit and get the same error (https://repl.it/@LukeKodanko/boilerplate-npm). I cloned it as suggested and updated only the package.json. Was there something else I should be doing?
I found on another thread that I have to make sure the server.js has this line app.route(’/_api/package.json’) which it does.

This is what the boilerplate package.json looks like:

{
	"name": "fcc-learn-npm-package-json",
	"dependencies": {
		"express": "^4.14.0"
	},
	"main": "server.js",
	"scripts": {
		"start": "node server.js"
	},
	"repository": {
		"type": "git",
		"url": "https://idontknow/todo.git"
	}
}

This is what the instructions are:

Add your name as the author of the project in the package.json file.

This is what your package.json looks like:

{
  "name": "fcc-learn-npm-package-json",
  "author": "Luke Kodanko",
  "version": "1.0.0"
}

Something has gone wrong, along the way…

I actually originally had all that but it wasn’t working so I tried removing everything but the very basic to see if I could get it to pass. Put that all back in and it still doesn’t pass the challenge. BTW… I really appreciate your help on this.

You need to run the project, before trying to submit. When you run the project, because you deleted some things in the package.json, you will likely see errors. So, you will need to open the Replit Shell, and run npm install. Then, run the app, and submit the link.

That was it… thanks so much!!!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.