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
nameas the author of the project in thepackage.jsonfile. - Add a
descriptionto thepackage.jsonfile. - Add a
keywordsfield to thepackage.jsonfile and give it an array value. - Add a
licensefield to thepackage.jsonfile. - Add a
versionfield to thepackage.jsonfile. - Add version
1.1.0of the@freecodecamp/examplepackage to thedependenciesfield of yourpackage.jsonfile. - In the dependencies section of your
package.jsonfile, change the version of@freecodecamp/exampleto 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/exampleis to use a specific version(1.2.13). But now, you want to allow the latest1.2.xversion.Use the tilde
(~)character to prefix the version of@freecodecamp/examplein your dependencies, and allow npm to update it to any new patch release. - Use the caret (
^) to prefix the version of@freecodecamp/examplein 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