rogeriochaves / npm-force-resolutions

Force npm to install a specific transitive dependency version
567 stars 28 forks source link

Running the tool reorders `dependencies` within my package-lock.json #68

Open jayqui opened 2 years ago

jayqui commented 2 years ago

Hi there, I followed the instructions on your README and it seems to have worked well. One weird behavior I am seeing is that the lists of dependencies and devDependencies in my package-lock.json gets scrambled into a seemingly random order.

Is this expected behavior?

R3DST0RM commented 2 years ago

This shouldn't be expected behavior, there are possible errors that can occur as a result of that.

One issue, that I stumbled upon was: https://github.com/rogeriochaves/npm-force-resolutions/issues/57#issuecomment-1074104444

joshuaeilers commented 2 years ago

Noticing the same issue. Without the npm-force-resolutions our npm install does not change package-lock.json.

massimocode commented 2 years ago

This is affecting us too. Took around 1 hour to find this issue. Turned off npm-force-resolutions and now we're ok, but I presume it's a high priority one to fix this.

R3DST0RM commented 2 years ago

This is affecting us too. Took around 1 hour to find this issue. Turned off npm-force-resolutions and now we're ok, but I presume it's a high priority one to fix this.

There is an open PR to fix it (https://github.com/rogeriochaves/npm-force-resolutions/pull/58) , for the time being an alternative package called force-resolutions did the trick for me.