Should you store package.json file to a version control?
Experience Level:
Junior
Tags:
npm
Answer
Yes, you should. A file package.json contains all the necessary information that you need in order to be able to install (restore) the project dependencies.
Without package.json you wouldn't know what packages (modules) the package needs.
Related npm job interview questions
-
Where does npm get the modules from?
npm Junior -
How can you get a list of commands that are available in npm?
npm Junior -
Should you store node_modules directory to a version control?
npm Junior -
How do you install npm?
npm Junior -
How do you update npm packages to new versions?
npm Junior