Search code examples
node.jsnode-modulesyarnpkgnpm-packageyarn-lock.json

Why there are differences in the order of properties and double quotation marks in the yarn.lock file?


I installed node_modules using yarn on a cloned project.

yarn.lock diff

The original lockfile has double quotation marks and the newly created lockfile does not. Also, the order of integirity, version, etc. have all changed. Is there any way to configure yarn so that the original file format is used?

Tried

  • yarn or yarn install
    • The result was the same in both cases
  • yarn install --frozen-lockfile
    • Naturally, it was installed with no changes to the lock file.
    • This is fine for just installation, but when making changes to the package, the same problem occurs because the lock file is updated.

Solution

  • The project was supposed to use yarn, but one member was using npm.