-1

I have installed some npm modules without --save option. As a result the dependencies were not added in my package.json.

Is there any way to add the dependencies of my existing node modules in my package.json via npm without having to add them manually ?

korteee
  • 2,640
  • 2
  • 18
  • 24

1 Answers1

1

1) You may use linked answer

npm init --yes

2) npm list command

npm ls -json

Create backup of your package.json file. Create new one and diff two of them.

Community
  • 1
  • 1
Atilla Ozgur
  • 14,339
  • 3
  • 49
  • 69