What command is used to initialize a new Node.js project and create a package.json file?

Node.js Developer Easy

Node.js Developer — Easy

What command is used to initialize a new Node.js project and create a package.json file?

Key points

  • npm init is used to create a new Node.js project
  • It generates a package.json file for the project
  • The command prompts you to enter project details
  • Options A, B, and D do not serve the same purpose as npm init

Ready to go further?

Related questions