cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] npm i in macOS and Windows produces different package-lock

Open guoliang opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] I am using the latest npm

Current Behavior

We have developers using Windows and macOS and we've noticed for local packages installed in Windows it uses forward slashes, while on macOS it uses backward slash. This becomes an issue since we are getting a "change" which isn't really a significant change.

image

Expected Behavior

Should use same kind of slash

Steps To Reproduce

  1. npm install local package in Windows
  2. npm install local package in macOS

Environment

  • npm: 8.19.4
  • Node.js: 16.20.0
  • OS Name: macOS

guoliang avatar Apr 19 '23 14:04 guoliang

Few years later, I ran into the same issue. It helped adding the backslashes in my package.json, looks like unix systems are able to handle that.

maertz avatar Oct 16 '23 09:10 maertz

I have the same problem. Can this lead to installation errors on other OSes?

dpereverza-just-ai avatar Feb 12 '24 13:02 dpereverza-just-ai