-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Surface error occurring during import of @parcel/watcher #9580
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
Surface error occurring during import of @parcel/watcher #9580
Conversation
Follow up from #9506
🦋 Changeset detectedLatest commit: 8061d85 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@spawnia can you please run |
Sure. I found no mention of this in the contributor guide, perhaps something like https://github.com/marketplace/actions/prettier-action could help to smooth this process. |
How can the failing PR check be solved? I would love for this change to be included. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the delay on this one
Description
Follow up from #9506, which provides the following error message when failing to import
@parcel/watcher
:I think the provided error message is unclear and misleading in a couple of ways:
@parcel/watcher
as a peer dependency. It makes sense for it to be a peer dependency of this package, but unless the user itself is distributing a package, they should just install the package.@parcel/watcher
from working, even if installed.In my environment, simply installing
@parcel/watcher
as a dependency was not sufficient. After some debugging, I modified the piece of code that produces the error message to append the thrownerr
and found that the cause was more detailed:Thus, I am proposing this change to the error message which improves upon the previous mentioned points:
@parcel/watcher
must be installed, not just a peer dependency.The final output is now this:
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
node_modules/@graphql-codegen/cli/cjs/utils/watcher.js
graphql-codegen --watch
commandTest Environment:
node:18.13.0-bullseye-slim
@graphql-codegen/cli
: 5.0.0Checklist: