Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package-lock.json behaves weirdly in npm-check-updates versions >= 16.4.0 #1347

Open
jashan777 opened this issue Nov 4, 2023 · 4 comments
Open

Comments

@jashan777
Copy link

jashan777 commented Nov 4, 2023

  • [✔️] I have searched for similar issues
  • [✔️] I am using the latest version of npm-check-updates
  • [✔️] I am using node >= 14.14

Steps to Reproduce

node version - v14.20.0
npm version - v6.14.17
os - windows 11 or macos ventura 13.4

  1. add npm-check-updates dependency in package.json file, version >= v16.4.0
  2. do npm i
  3. stage the changes, package.json and package-lock.json
  4. remove the node_modules folder
  5. do npm i again.

package-lock.json will change.

The changes are reverted if node_module folder is deleted and npm i is done.

ScreenShots
Below are the changes in package-lock.json after second npm i
Screenshot 2023-11-04 120815
Screenshot 2023-11-04 120833
Screenshot 2023-11-04 120850
Screenshot 2023-11-04 120951
Screenshot 2023-11-04 121008

first npm i : package-lock.json
packageFirst.txt.txt

second npm i: package-lock.json
packageSecond.txt.txt

@jashan777 jashan777 changed the title package-lock.json changes unexpectedly in npm-check-updates versions >= 16.4.0 package-lock.json behaves weirdly in npm-check-updates versions >= 16.4.0 Nov 4, 2023
@jashan777
Copy link
Author

jashan777 commented Nov 4, 2023

seems to be a npm version issue as the issue doesn't appear in npm versions >=8.19.3 & node>= 16.19.0

@raineorshine
Copy link
Owner

Yeah, this is more an npm issue than npm-check-updates. We don't touch the package lock file, and we don't have control over how the modules are installed.

@jashan777
Copy link
Author

jashan777 commented Nov 4, 2023

Yeah, this is more an npm issue than npm-check-updates. We don't touch the package lock file, and we don't have control over how the modules are installed.

The changes are reverted if one remove the node_modules folder again and do npm i , but suprisingly npm-check-updates version <= 16.3.0 works just fine and doesnt cause this issue.

@raineorshine
Copy link
Owner

Yes, that does seem strange. I wonder what changed between 16.3.0 and 16.4.0 that changed npm's install behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants