I’m in the backend and API course of freecodecamp, the part where it tells you to “Expand your project with external packages from npm” the instructions tells me to add version “1.1.0” of the @freecodecame/example package to the dependencies field of your package.json file. It says that I need to store it in this format. I was trying different things for almost an hour now and I would appreciate it if someone could explain to me what is going on and how I can fix this, thank you!
I’ve pasted the link of the browser into freecodecamp and this came up:
// running tests
version should be
. // tests completed
This is my code so far
"keywords": ["title", "pattern", "required", "freecodecamp"],
"description": "A starter project for my learning journey with freecodecamp",
"start": "node server.js"
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.96.36.199 Safari/537.36
Challenge: Managing Packages with NPM - Expand Your Project with External Packages from npm
Link to the challenge:
The instructions state:
Add version “1.1.0” of the
@freecodecamp/example package to the
dependencies field of your
Instead, with the
package.json screenshot above, you tried to add a package named
package-name with a version of
@freecodecamp/example and then changed the version of the existing package
express to be
To fix your issues:
- Do not change the
express package version.
- Add a package named
@freecodecamp/example with its version being
There should only be two packages listed in the
dependencies section when you complete this challenge. One is
@freecodecamp/example and the other is
Thank you very much for reaching out, I’ve tried fixing it the way you told me to but without luck it doesn’t work. This is the error message it :
// running tests
"dependencies" should include
"@freecodecamp/example" version should be
"1.1.0" . // tests completed
and this is the code. I tried deleting line 20 to 22 because in the original package, it doesn’t exist but the error messages come up.
Please post a link to your latest project code.
When I look at your
package.json file, I see two different
dependencies sections. There should only be one
dependencies section and it should contain the original
express package and version plus the new dependency and version you added (correctly).
I got an error message after putting the original express with the new express.
Why do you have two
express in your
dependencies section? Also, you need to make sure that you are putting commas were appropriate within
I added a comma at the end of line 9 and the same error messages still pop up.
Did you git rid of the incorrect
Which one is the incorrect express?
Look at the
package.json file by clicking on the starter code link in the challenge and you will see.
This is the original starter code:
This is my code, I tried running it again but results are the same
And just like I said before, you should only have one instance of
express listed in
dependencies. You still have two.
My build was failed in Heroku after add the following
The error i got
Installing node modules
npm ERR! cipm can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR! Missing: @email@example.com
ii executed the npm install in the command line even though it fails.