# Creating a package.json file in JavaScript

You can create a `package.json` file with all the necessary settings using a terminal. To do this, you need to run the following command:

`npm init`

After running the command, a terminal will ask you for the parameter values, and after that it will create the `package.json` file.

If you don't want to answer questions, then using the `-y` flag you can force the terminal to answer "yes" to all system questions:

`npm init -y`

Using a terminal, open a folder in it and create a `package.json` file in this folder.

← →
↑
en ru