Managing Packages With NPM
This is the boilerplate code for the Managing Packages With npm Challenges. Click here to view the instructions for working on these challenges on freeCodeCamp.
Challenge
- Add your
name
as the author of the project in thepackage.json
file. - Add a
description
to thepackage.json
file. - Add a
keywords
field to thepackage.json
file and give it an array value. - Add a
license
field to thepackage.json
file. - Add a
version
field to thepackage.json
file. - Add version
1.1.0
of the@freecodecamp/example
package to thedependencies
field of yourpackage.json
file. - In the dependencies section of your
package.json
file, change the version of@freecodecamp/example
to match MAJOR version 1, MINOR version 2 and PATCH version 13 - In the package.json file, your current rule for how npm may upgrade
@freecodecamp/example
is to use a specific version(1.2.13)
. But now, you want to allow the latest1.2.x
version.Use the tilde
(~)
character to prefix the version of@freecodecamp/example
in your dependencies, and allow npm to update it to any new patch release. - Use the caret (
^
) to prefix the version of@freecodecamp/example
in your dependencies and allow npm to update it to any new MINOR release.Note: The version numbers themselves should not be changed.
- Remove the @freecodecamp/example package from your dependencies.
Note: Make sure you have the right amount of commas after removing it.
Solution
{
"name": "fcc-learn-npm-package-json",
"author": "Juan Diaz",
"description": "A project created by Juan Diaz on feb 19 2025 for the Managing Packages with npm challenges on FreeCodeCamp",
"keywords": ["freecodecamp", "npm", "challenge", "learn", "juan", "diaz"],
"license": "MIT",
"version": "1.0.0",
"dependencies": {
"express": "^4.14.0"
},
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"repository": {
"type": "git",
"url": "https://github.com/freeCodeCamp/boilerplate-npm.git"
}
}
-
View the package.json in my repository.
-
Live link of the package.json