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
npm for beginners
npm for beginners

Are you learning npm? Try our test we designed to help you progress faster.

Test yourself