graphql-typed-document-node icon indicating copy to clipboard operation
graphql-typed-document-node copied to clipboard

Can not resolve this package

Open lemiesz opened this issue 11 months ago • 1 comments
trafficstars

ERROR in ./src/graphql/graphql.ts 2:0-86 Module not found: Error: Can't resolve '@graphql-typed-document-node/core' in '/local/home/lemiesz/Projects/[redacted] @ ./src/graphql/fragment-masking.ts 5:0-40 @ ./src/graphql/index.ts 1:0-35 1:0-35 @ ./src/components/App.tsx 16:0-38 25:0-7 @ ./src/index.tsx 4:0-35 36:40-43

I am getting this error

My codegen config looks like this

const config: CodegenConfig = {
   schema: process.env.SCHEMA_URL_OVERRIDE!,
   documents: ['src/**/*.tsx'],
   ignoreNoDocuments: true,
   generates: {
       './src/graphql/': {
           preset: 'client',
           config: {
               documentMode: 'string',
           },
       },
       './src/apollo/apollo-client.generate.ts': {
           plugins: ['typescript', 'typescript-operations', 'typescript-react-apollo'],
           config: {
               withHooks: true,
           },
       },
       './schema.graphql': {
           plugins: ['schema-ast'],
           config: {
               includeDirectives: true,
           },
       },
   },
};

lemiesz avatar Dec 18 '24 02:12 lemiesz