The best time to npm init
Published on:When should you npm init
?
Most developers run npm init
right after creating and navigating into a new project.
It makes sense to npm init
at the start of the project because we use npm to download dependencies. Once we npm init
, we can begin downloading (and saving) our dependencies.
For most projects, this workflow works.
But if you're creating an open source project, the best time to npm init
is slightly later. If you npm init
right after creating and navigating into the project, you'll miss out a few things.