What does npm init command do and when would you use it?

Experience Level: Junior
Tags: npm


The command npm init creates a file package.json.

You can use it whenever you need to create a new Node.js project. When the file exists, you can add a dependency or devDependency to the file and install it using npm.


No Comments Yet.
Be the first to tell us what you think.
npm for beginners
npm for beginners

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

Test yourself