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,209
  • 10
  • 24
  • 44
Derek Jin
  • 652
  • 2
  • 12
  • 29

1 Answers1

-2

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
  • 15
  • 5