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 JuniorHow can you get a list of commands that are available in npm?
npm JuniorShould you store node_modules directory to a version control?
npm JuniorHow do you install npm?
npm JuniorHow do you update npm packages to new versions?
npm Junior