エラー内容
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
こちらもおススメ