Home > front end >  Do I need to use npm init every time I create a new project?
Do I need to use npm init every time I create a new project?

Time:05-24

I saw people explaining that npm init is necessary to create the package.json file. But in my last practice project I forgot to use npm init and the package.json file was created when I used npx create-react-app ...

Can someone help me to understand this, please?

CodePudding user response:

Package.json file is a file where you specify the name of the application ,the version, the licence the dependancies the app needs etc.It is not necessary to do npm init before spinning up a new react project as it comes with a package json file that has the project dependancies and scripts to start/run the app .You can just modify the package json file that comes with the react app to fit your needs.

  • Related