How to Use package.json, the Core of Any Node.js Project or npm Package
Problem Explanation
Remember, you’re writing JSON, so make sure you use
- double quotes
-
"key": value
format - the correct number of commas
Solutions
Solution 1 (Click to Show/Hide)
{
"name": "fcc-learn-npm-package-json",
"author": "foobar",
"dependencies": {
"express": "^4.14.0"
},
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"engines": {
"node": "8.11.2"
},
"repository": {
"type": "git",
"url": "https://idontknow/todo.git"
}
}