エラー内容
npm install @graphql-codegen/cliと./node_modules/.bin/graphql-codegen initをした後に、graphql-codegenコマンドを実行しようとしたら、下記のエラーが発生した。
- Unable to find template plugin matching typescript-operations
メッセージの内容
npm run graphql-codegen
> frontend@0.1.0 graphql-codegen
> graphql-codegen --config graphql-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-operations
原因
initした後に、npm installしていなかった。
対応
npm installした後にgraphql-codegenコマンドを実行する。
npm install
npm run graphql-codegen
関連記事