graphql-code-generator icon indicating copy to clipboard operation
graphql-code-generator copied to clipboard

`@parcel/watcher` not working with pnpm

Open nagman opened this issue 2 years ago • 2 comments

Which packages are impacted by your issue?

@graphql-codegen/cli

Describe the bug

The @parcel/watcher package is not detected as a peer dependency when installed with pnpm.

Your Example Website or App

https://stackblitz.com/edit/github-8b9tnc?file=package.json

Steps to Reproduce the Bug or Issue

Run pnpm start

Expected behavior

Expected: codegen running in watch mode Reality: Parcel watcher not found. To use this feature, please make sure to provide @parcel/watcher as a peer dependency.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • NodeJS: 18.18.0
  • graphql version: 16.8.1
  • @graphql-codegen/* version(s): 5.0.0 for the cli, 4.1.0 for the client-preset

Codegen Config File

import type { CodegenConfig } from '@graphql-codegen/cli';
import { NEXT_PUBLIC_BACKEND_URL } from './app/utils/env';

const config: CodegenConfig = {
	overwrite: true,
	schema: `${NEXT_PUBLIC_BACKEND_URL}/graphql`,
	ignoreNoDocuments: true,
	documents: './app/**/*.graphql',
	generates: {
		'./app/gql/': {
			preset: 'client',
		},
	},
};

export default config;

Additional context

When I downgrade the @parcel/watcher to 2.1.0, it works.

When I install the packages with yarn too.

nagman avatar Nov 02 '23 11:11 nagman

Interesting, maybe worth also reporting to parcel and linking the issue here?

Urigo avatar Nov 19 '23 14:11 Urigo

Having the same issue, has one found a solution to this? I don't have @parcel/watcher in my dependencies and it'd be great if I wouldn't have to add it, I guess?

holtergram avatar Jan 05 '24 09:01 holtergram