0

Currently, I have a small issue with package-lock file between difference OS system(Mac OS / Linux)

My colleague and me use makefile to run project and the contained commend is only npm install and npm run start, however when we run a project, the package-lock file has been changed. please refers the image below.

Example

enter image description here

I read the official document but couldn't find related answer. I slightly suspect this might come from the OS difference, but not sure about it.

Does anyone know why this un-wanted changing occurs?

Thank you!

Version:

         me    |   colleagu
node. v16.14.2 | v17.6.0
npm. v8.5.5    | v8.5.1
Jincheol Park
  • 91
  • 1
  • 11
  • 1
    `npm install` can/does update `package-lock.json`, because `package.json` may have been updated with dependencies being updated: removed, added, or changed. The differences you are seeing (the elision of the `requires` property is likely due to the differences in `npm` versions between you and your partner. You might want to consider using [`npm ci`](https://docs.npmjs.com/cli/v8/commands/npm-ci) to do you installs, assuming package.json has not been updated. `npm ci` is the "continuous integration" install and will never update `package-lock.json`. – Nicholas Carey Apr 01 '22 at 17:11
  • Thank you for the reply and sorry for late comment @NicholasCarey , I already tried `npm ci` but, we still have some issues. What if we want to install or update a specific package, anyway `npm install` command would be needed, then the un-wanted structure change in `package-lock` might be again. does it any other way to try? – Jincheol Park Apr 04 '22 at 08:11

0 Answers0