OA. free
Free
Nopal Securities Core Computer Science Core Computer Science Medium

Which CLI command is used to initialize a new Node.js project creating a package.json file?

Nopal Securities technical mcq question with a worked answer. Free to practise - no sign-up.

Which CLI command is used to initialize a new Node.js project creating a package.json file?

Choose one option.
Show answer & explanation
Answer: A. npm init

The command 'npm init' initializes a new npm package and generates package.json.

Step-by-step Derivation:
Step 1: Standard Node package manager project setup command is 'npm init'.