Skip to content

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

Merged
merged 7 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/plenty-seahorses-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/cli': patch
---

Surface error occurring during import of @parcel/watcher
2 changes: 1 addition & 1 deletion packages/graphql-codegen-cli/src/utils/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const createWatcher = (
parcelWatcher = await import('@parcel/watcher');
} catch (err) {
log(
`Parcel watcher not found. To use this feature, please make sure to provide @parcel/watcher as a peer dependency.`
`Failed to import @parcel/watcher due to the following error (to use watch mode, install https://www.npmjs.com/package/@parcel/watcher):\n${err}`
);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ It's also helpful to run the codegen during your continuous integration flow and
<Callout type="info">
Watch mode was made optional to reduce install size in CI and prevent build errors in certain environments.

To use watch mode, make sure to provide `@parcel/watcher` as a peer dependency.
To use watch mode, install [`@parcel/watcher`](https://www.npmjs.com/package/@parcel/watcher).

</Callout>

Expand Down