A
A
Alex_872019-05-21 16:35:07
npm
Alex_87, 2019-05-21 16:35:07

Why is the contents of package-lock.json destroyed?

Good evening everyone! When creating a new project, I drag the package-lock.json file into the new folder and when I run the npm install command, I expect to create a new package.json file. But, for some reason, after this command, from the file with the contents:

{
  "requires": true,
  "lockfileVersion": 1,
  "dependencies": {
    "font-awesome": {
      "version": "4.7.0",
      "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz",
      "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM="
    },
    "jquery": {
      "version": "3.4.1",
      "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz",
      "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==",
      "dev": true
    },
    "popper.js": {
      "version": "1.15.0",
      "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.15.0.tgz",
      "integrity": "sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA=="
    },
    "slick-carousel": {
      "version": "1.8.1",
      "resolved": "https://registry.npmjs.org/slick-carousel/-/slick-carousel-1.8.1.tgz",
      "integrity": "sha512-XB9Ftrf2EEKfzoQXt3Nitrt/IPbT+f1fgqBdoxO3W/+JYvtEOW6EgxnWfr9GH6nmULv7Y2tPmEX3koxThVmebA=="
    },
    "stacktable.js": {
      "version": "1.0.3",
      "resolved": "https://registry.npmjs.org/stacktable.js/-/stacktable.js-1.0.3.tgz",
      "integrity": "sha512-7QBEwZLwxja0ZACbMwJ2GbU91Ua7j1a3TTcZRXPGNJZYrEWEAIte3B9khhqFvCkJe6iCwGUMrU3YUn8gNEN9Hw=="
    }
  }
}

I GET
{
  "lockfileVersion": 1
}

Please explain why this is happening?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question