Reputation: 1954
I was working on a project and i accidentally deleted my package.json file then i again used npm init command to create new one but i already had a lot of gulp extensions in my node_modules...
So now how can i add those dependencies again back to my new package.json file
How can a package.json file be get list of dependencies from my node_modules folder?
Upvotes: 2
Views: 1012
Reputation: 7343
you can alternatively list all installed dependencies using:
npm list --depth=0
and then manually add them to your package.json file
if you want to get globally installed packages, use
npm list -g --depth=0
Upvotes: 3