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

An error is mistakenly produced if a workspace package does not contain a package.json #128

Open
mcmire opened this issue Dec 15, 2023 · 1 comment

Comments

@mcmire
Copy link
Contributor

mcmire commented Dec 15, 2023

If you're running this tool against a repo that you haven't updated in a while and you happen to have empty directories in packages/ — because the packages were removed at some point, but Git isn't smart enough to have removed the directories — then the tool will abort with an error that looks like this:

[Error: ENOENT: no such file or directory, open 'packages/snaps-types/package.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'packages/snaps-types/package.json'
}

This is happening because snaps-types/ is a directory in one of the workspace paths (packages/), and so this tool expects it to be a package.

In this case the tool should possibly produce a warning, but it should definitely continue without producing an error.

@mcmire
Copy link
Contributor Author

mcmire commented Mar 26, 2024

Just encountered this again today.

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

1 participant