Package installing error on

While doing the NPM tutorial on “Back End Development And APIs” class (I’m running it on I run into a problem when I’m told to add a package and it’s version into the package.json file.
I’m asked to add the package “moment” in version “2.14.0” but when I add this to the dependencies:

"dependencies": {
    "package-name": "moment",
    "express": "2.14.0"

I get this error on

Replit: Updating package configuration

→ npm install
npm ERR! code ETARGET
npm ERR! notarget No matching version found for package-name@moment.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn’t exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of ‘boilerplate-npm’
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-10-26T14_38_12_873Z-debug.log
exit status 1

Replit: Package operation failed.

I don’t know how what I’m doing wrong and also if it’s freecodecamp’s own bug how do I forceskip the current lesson I’m in?

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0

Challenge: Expand Your Project with External Packages from npm

Link to the challenge:

“dependencies”: {
  “package-name”: “moment”,
  “express”: “2.14.0”

But shouldn’t this:

  “package-name”: “moment”,


  “moment”: “2.29.1”,

or whatever you want?

I don’t know replit well, but there isn’t a version of “npm install …” or something automated like that?

Of course you can command repl to install npm pkgs…

1 Like

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Who was it directed at?

I edited @alonlearnscode 's post

@jwilkins.oboe you didnt mention it. Thats why I asked.

If this where a longer thread with a lot of different users then I would have mentioned the user’s name in my post.

But in this case, you didn’t post any code so my reply wouldn’t make sense to you.
And Kevin is a moderator who already knows how to format code.
So my reply wouldn’t work for him either.

The only other user left is the original poster. :grinning:

Also, if I had edited your post then the system would have notified you.
The original poster was also notified by the system that their post was edited.

Hope that clears it up!


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