Managing package with npm failing

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

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 :laughing:. Might want to read about caret and tilde.

Aahh… I see :sweat_smile:
I didn’t know that caret and tilde have purpose on the json file :laughing:
Thank you @danzel-py , you’re the best

1 Like

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