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

[BUG] Removing dependency from workspace package leads to invalid lockfile #2162

Closed
protyposis opened this issue Nov 12, 2020 · 2 comments
Closed
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release

Comments

@protyposis
Copy link

Current Behavior:

When removing a dependency from a workspace package's package.json and executing npm install in the workspace root to update its package-lock.json (as discussed in #2036 and #1984), the file structure ends up in an invalid state where the version property holds the URL from the resolved property, instead of removing the whole dependency block. See this changeset after npm install:

image

Expected Behavior:

package-lock.json is in a valid state and all artifacts of the removed dependency are removed from the lockfile.

Steps To Reproduce:

  • remove dependency from workspaceRoot/packages/package-a/package.json
  • execute npm install in workspaceRoot/
  • investigate changes to lockfile

Environment:

  • OS: Windows 10
  • Node: 12.19.0
  • npm: 7.0.10
@protyposis protyposis added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Nov 12, 2020
@protyposis
Copy link
Author

Fixed in 7.1.1, thanks!

@petermikitsh
Copy link

I'm observing this in 7.5.4; see #2706

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants