Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How generate nodejs express dependencies package.json

As I started to develop my first nodejs express application, I added many packages with npm.

I would like to know if there is a way to generate a package.json file containing all the current dependencies or the list of the current packages under the nodes_modules directory.

like image 940
Sladix Avatar asked Dec 02 '22 20:12

Sladix


1 Answers

Just run npm init in the same directory as your project.

You'll be asked a list of questions (name, version, description, etc.) and once complete, it will generate a package.json file with all of the dependencies as currently installed in the node_modules directory.

like image 199
Simon Guest Avatar answered Dec 23 '22 04:12

Simon Guest