Creating a package.json file from the terminal

Sydney, Australia

Hi, to create a package json from the terminal we just need to run the next command in the terminal

Your project:

1.- Go to you project source in the terminal

2.- Then run the next command

npm init 

3.- The terminal will ask you some questions about the packages that you want to install, the author name (you in this case), etc. If you don’t want to fill this information then just press enter.

4.- Finally go to your project and done! you will have the package.json created, ready to install dependencies 🙂

By Cristina Rojas.