graphql-codegen-plugin-typescript-swr icon indicating copy to clipboard operation
graphql-codegen-plugin-typescript-swr copied to clipboard

Build directory appears to be missing in 0.8.4

Open mrkutly opened this issue 1 year ago • 4 comments

  • I'm submitting a ... [x] bug report [ ] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project

Summary I am getting the following error when trying to run the @graphql-codegen/cli:

✔ Parse Configuration
⚠ Generate outputs
  ❯ Generate to src/api/graphql/index.ts
    ✔ Load GraphQL schemas
    ✔ Load GraphQL documents
    ✖
      Unable to find template plugin matching 'plugin-typescript-swr'
      Install one of the following packages:
      - @graphql-codegen/plugin-typescript-swr
      - @graphql-codegen/plugin-typescript-swr-template
      - @graphql-codegen/plugin-typescript-swr-plugin
      - graphql-codegen-plugin-typescript-swr
      - graphql-codegen-plugin-typescript-swr-template
      - graphql-codegen-plugin-typescript-swr-plugin
      - codegen-plugin-typescript-swr
      - codegen-plugin-typescript-swr-template
      - plugin-typescript-swr

Other information

When checking the error being thrown inside the cli code, I see this message:

✔ Parse Configuration
⚠ Generate outputs
  ❯ Generate to src/api/graphql/index.ts
    ✔ Load GraphQL schemas
    ✔ Load GraphQL documents
    ✖ Cannot find module '[my project dir]/node_modules/graphql-codegen-plugin-typescript-swr/build/main/index.js'. Please verify that the package.json has a valid "main" entry

Checking the package.json for this plugin shows that main is build/main/index.js. When I install 0.8.3, everything works and I can see that the build dir is in included in the package: Screenshot 2023-04-11 at 11 05 05 AM

In 0.8.4, this build directory is not included when installing the package: Screenshot 2023-04-11 at 11 05 32 AM

Please let me know if I can provide any other info to help debug this issue!

mrkutly avatar Apr 11 '23 15:04 mrkutly

Currently running on 0.8.3 for my project. Hope they fix this soon. Big thanks for noticing this issue, helped me a lot <3

DaanKorver avatar Apr 12 '23 09:04 DaanKorver

Any updates on this?

DaanKorver avatar May 08 '23 08:05 DaanKorver

get same problem

BrainEno avatar May 29 '23 10:05 BrainEno

@mrkutly Thank you for reporting. Just released v0.8.5 to fix packaging issue. Please try, and let me know how it goes.

eitoball avatar Aug 07 '23 11:08 eitoball