Managing Packages with NPM - How to Use package.json, the Core of Any Node.js Project or npm Package

Tell us what’s happening:
Stuck in the first back end challenge, using replit. All I need to do is add the “author”:“my name” key to the package.json. I’ve done that (and I’ve even tried copy/pasting the given solution).

Based on something I saw in the forum, I ran the code in replit and I’ve tried pasting in the url from the replit browser over the pane where the results display. I’ve also tried pasting in the link to the repl itself, but neither passes the test.
Your project link(s)

Link to repl: boilerplate-npm - Replit

solution: boilerplate-npm - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

Challenge: Managing Packages with NPM - How to Use package.json, the Core of Any Node.js Project or npm Package

Link to the challenge:

Yes, that is the url I submitted-it is the one from the preview window:
https://boilerplate-npm.johnshelb.repl.co

The link to the code is:

I didn’t take a screenshot, that just appeared when I pasted in the url for the code. But when I click on Run in the screenshot, the preview window does appear:

Manage Node.js projects and npm packages using package.json

Part 1 of Free Code Camp Backend Challenges

Oh, I just saw the second part of your message. Okay, I’ll start over with a new replit.

I started over:

  1. clicked on the starter link

  2. When the repl loaded, I chose “use run command” and clicked “Done”

  3. I changed the package.json file so it looks like this:
    {
    “name”: “fcc-learn-npm-package-json”,
    “author”:“Jane Doe”,
    “dependencies”: {
    “express”: “^4.14.0”
    },
    “main”: “server.js”,
    “scripts”: {
    “start”: “node server.js”
    },
    “repository”: {
    “type”: “git”,
    “url”: “https://idontknow/todo.git
    }
    }

  4. I clicked Run. The webview pane showed:

Manage Node.js projects and npm packages using package.json

Part 1 of Free Code Camp Backend Challenges

  1. I copied the url from above that preview window
  2. I pasted the url into the solution link input
  3. This is the result:
    // running tests
package.json

should have a valid “author” key // tests completed // console output [Error]

Tests

  • Failed:package.json should have a valid “author” key

Any idea why this is failing?

It’s the same Replit issue others face. Use this URL instead (-- instead of . in front of the user name).

https://boilerplate-npm--johnshelb.repl.co

6 Likes

Thank you so much, lasjorg! It’s so frustrating to be stuck at the very beginning like that. I very much appreciate the rescue!

Hi, do you remember how do you change the url? I’ve tried just adding “–” like this:
https://boilerplate-npm.1dore--repl.co
but it doesn’t work.
This is what I am using:

The dashes should be between the Replit name and the user name.

https://boilerplate-npm--1dore.repl.co/

If anybody else is stuck on this - I /think/ Replit charges for publishing now and after hours of trying to figure this out (created an own domain for $1 but no go with the test…) what
worked was using Glitch as described here: freeCodeCamp Challenge Guide: Add a Description to Your package.json

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