What does "requires: true" do in package-lock.json

Viewed 4639

Our team just updated to npm@5. The package-lock.json was unified between Windows and Mac (certain dependencies are optional so they don't get installed on Windows, but they do on Mac) so that no matter the machine, we'd generate the same node_modules structure. That went fine, then each of the team members went through the following steps:

  1. rm -rf node_modules
  2. git pull
  3. npm install

This actually went perfectly for all team members except for one, who had a modified package-lock.json after the npm install. The one modified line was that it removed "requires": true.

So I saw:

{
  ...
  "version": "0.0.1",
  "lockfileVersion": 1,
  "requires": true,
  "dependencies": {
  ...
}

But he saw:

{
  ...
  "version": "0.0.1",
  "lockfileVersion": 1,
  "dependencies": {
  ...
}

Does anybody know why requires: true might be removed from the package-lock.json file on some machines but not others? Also, a little explanation of what this property does wouldn't hurt. :)

Thanks in advance!

1 Answers
Related