benawad / lireddit

https://youtu.be/I6ypD7qv3Z8
MIT License
1.77k stars 467 forks source link

Unable to find template plugin matching typescript-urql #33

Open sidx8 opened 3 years ago

sidx8 commented 3 years ago

Hi @benawad thanks for the great video I ran into a problem at around 2:51:16 if anybody can help me out that would be great thanks btw I tried deleting the node modules and reinstalling them but it still doesn't work

After running yarn gen it gives the following error

yarn run v1.22.10 $ graphql-codegen --config codegen.yml √ Parse configuration

Generate outputs Generate src/generated/graphql.tsx √ Load GraphQL schemas √ Load GraphQL documents × Generate → Unable to find template plugin matching typescript-urql

Found 1 error

✖ src/generated/graphql.tsx Unable to find template plugin matching 'typescript-urql' Install one of the following packages:

- @graphql-codegen/typescript-urql
- @graphql-codegen/typescript-urql-template
- @graphql-codegen/typescript-urql-plugin
- graphql-codegen-typescript-urql
- graphql-codegen-typescript-urql-template
- graphql-codegen-typescript-urql-plugin
- codegen-typescript-urql
- codegen-typescript-urql-template
- typescript-urql
Error: Unable to find template plugin matching typescript-urql
    at getPluginByName (C:\Users\shash\Desktop\Dev Company\reddit-clone\node_modules\@graphql-codegen\cli\bin.js:335:11)
    at async Promise.all (index 2)
    at async C:\Users\shash\Desktop\Dev Company\reddit-clone\node_modules\@graphql-codegen\cli\bin.js:895:60  
    at async Task.task (C:\Users\shash\Desktop\Dev Company\reddit-clone\node_modules\@graphql-codegen\cli\bin.js:727:17)
Error: Unable to find template plugin matching typescript-urql
    at getPluginByName (C:\Users\shash\Desktop\Dev Company\reddit-clone\node_modules\@graphql-codegen\cli\bin.js:335:11)
    at async Promise.all (index 2)
    at async C:\Users\shash\Desktop\Dev Company\reddit-clone\node_modules\@graphql-codegen\cli\bin.js:895:60
    at async Task.task (C:\Users\shash\Desktop\Dev Company\reddit-clone\node_modules\@graphql-codegen\cli\bin.js:727:17)

Something went wrong error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

BravinR commented 2 years ago

I think you forgot to add the types for typescript-urql the following worked for me yarn add @graphql-codegen/typescript-urql