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!
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" . "@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.
My build was failed in Heroku after add the following
“@freecodecamp/example”: “1.1.0”,
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!
npm ERR!
npm ERR! Missing: @freecodecamp/example@1.1.0
npm ERR!
ii executed the npm install in the command line even though it fails.
Although I am a novice at full-stack development, I can appreciate how others are struggling with this problem. However, I was unable to locate giving version to a package in dependencies.
I was working on the dependencies section like this.