0

I am learning backend side using node.js and express framework. I added modules by npm install *** --save. After several hours i noticed that my project didn't contain package.json file.

There's only package-lock.json

I am now trying to add test command to use nodemon. Like dev: nodemon app.js. but there's no such part in package-lock.json file.

I don't want to start from scratch again.

James Z
  • 12,104
  • 10
  • 27
  • 43
Derek Jin
  • 583
  • 1
  • 8
  • 22

1 Answers1

-1

package-lock.json: records the exact version of each installed package which allows you to re-install them. Future installs will be able to build an identical dependency tree.

package.json: records the minimum version you app needs. If you update the versions of a particular package, the change is not going to be reflected here.

jmooree30
  • 7
  • 4