Skip to content

Conversation

owlstronaut
Copy link
Contributor

@owlstronaut owlstronaut commented May 1, 2025

Overrides #6997 with a more standard way of expressing errors in the cli and has a test for it.

@owlstronaut owlstronaut marked this pull request as ready for review May 1, 2025 18:22
@owlstronaut owlstronaut requested a review from a team as a code owner May 1, 2025 18:22
@owlstronaut owlstronaut merged commit d5bcf38 into latest May 14, 2025
16 checks passed
@owlstronaut owlstronaut deleted the owlstronaut/6997 branch May 14, 2025 16:20
@github-actions github-actions bot mentioned this pull request May 14, 2025
const err = new Error(
`Missing target in lock file: "${targetLoc}" is referenced by "${location}" but does not exist.
To fix:
1. rm package-lock.json
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually a bit too explosive. A more graceful fix would be to just remove the reference location from the package lock and then run npm i which fixes the issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, That was supposed to be removed

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That comment was only about removing node modules.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't ever recommend people manually edit their package-lock file. The real fix would be for npm install to fix the tree, but that's a much bigger lift.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough

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

Successfully merging this pull request may close these issues.

4 participants