hdwic
March 29, 2021, 7:12am
1
Hi All,
I’m stuck at managing package with npm, already change moment version to 2.10.2 but still not passed the test. I’ve tried uninstall and re-install specific version, and modify json file then run npm install in the repl.it console. The server runs without error, but still not passed the test in freecodecamp
Your project link(s)
solution: https://fcc-microservice.hdwic.repl.co
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
.
Challenge: Manage npm Dependencies By Understanding Semantic Versioning
Link to the challenge:
I can’t really help without the snippet of your code
hdwic
March 29, 2021, 9:02am
3
this is package.json content
{
"name": "fcc-learn-npm-package-json",
"version": "1.0.0",
"dependencies": {
"express": "^4.14.0",
"moment": "^2.10.2"
},
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"repository": {
"type": "git",
"url": "https://idontknow/todo.git"
},
"author": "Hdwic Wic",
"description": "Microservice first step",
"keywords": [
"freecodecamp",
"Microservices",
"Learning"
],
"license": "freecodecamp & replit.com"
}
Okay, so the challenge is
In the dependencies section of your package.json file, change the version
of moment to match MAJOR version 2, MINOR version 10 and PATCH version 2
Notice that the challenge specify the version to be 2.10.2
You added caret ^
which nobody asked for . Might want to read about caret and tilde .
hdwic
March 29, 2021, 9:17am
5
Aahh… I see
I didn’t know that caret and tilde have purpose on the json file
Thank you @danzel-py , you’re the best
1 Like
system
Closed
September 27, 2021, 9:18pm
6
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.