Suggest an editImprove this articleRefine the answer for “How do you initialize a project with npm?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)To initialize a project with npm, you run the **`npm init`** command, which creates a `package.json` file and sets the project's basic settings. **Key point:** the shortcut `npm init -y` creates `package.json` right away with default values, without asking any questions.Shown above the full answer for quick recall.Answer (EN)ImageYou can initialize a project with npm using the `npm init` command, which creates a `package.json` file and sets the project's basic settings. --- ### Steps and commands 1. **Go to the project folder** ```bash cd my-project ``` 2. **Run the initialization** ```bash npm init ``` This command asks a set of questions (name, version, author, license, and so on) and creates `package.json`. 3. **The simplified variant (no questions)** ```bash npm init -y ``` The `package.json` file is created right away with default values. --- ### The end result After initialization, a `package.json` file appears in the folder, where npm stores: - the list of dependencies - versions - scripts (`npm run ...`) - project metadata --- **Summary:** to initialize a project, it's enough to run `npm init` (or `npm init -y`) inside the target directory, after which you can install dependencies and add scripts.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.