Implement the following user story:
As a developer, I want to be able to keep track of dependencies using npm.
As a developer, I want to initialize my project and create a package.json file.
As a developer, I want to be able to save packages to my project.
It’s done when I see the package.json file created in a folder.
It’s done when I have installed the inquirer package successfully and see it listed in the package.json file.
It’s done when I see the node_modules folder and package-lock.json file in the folder.
Refer to the documentation:
It’s possible that the node_modules folder is hidden in the files.exclude setting in VS Code, so don’t let that throw you off if you don’t see it.
If you have completed this activity, work through the following challenge to further your knowledge:
-y flag save us some time when running npm init? What does the -g flag do when running npm install?Use Google or another search engine to research this.
{
"name": "solved",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"inquirer": "^7.3.3"
}
}