Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: upperCase couldn't be found in module upper-case! #3246

Closed
OneCyrus opened this issue Jan 7, 2020 · 8 comments
Closed

Error: upperCase couldn't be found in module upper-case! #3246

OneCyrus opened this issue Jan 7, 2020 · 8 comments
Labels
core Related to codegen core/cli waiting-for-release Fixed/resolved, and waiting for the next stable release

Comments

@OneCyrus
Copy link

OneCyrus commented Jan 7, 2020

Describe the bug
Error: upperCase couldn't be found in module upper-case!

image

To Reproduce
use namingConvention like

 config: {
    strict: true,
    namingConvention: {
      default: "change-case#pascalCase",
      enumValues: "change-case#upperCase"
    }
  },
@ardatan
Copy link
Collaborator

ardatan commented Jan 7, 2020

Until we fix it, could you install upper-case npm package in your project?

@OneCyrus
Copy link
Author

OneCyrus commented Jan 7, 2020

upper-case was already installed though version 1.x. after upgrading to 2.x it's running now.

@ardatan ardatan added bug core Related to codegen core/cli labels Jan 7, 2020
@umutyerebakmaz
Copy link

I made the last update. to ensure that I deleted the node_modules folders and reinstalled all packages. I have that same problem.

@ardatan
Copy link
Collaborator

ardatan commented Jan 8, 2020

@OneCyrus @umutyerebakmaz Could you try with the canary version 1.11.2-alpha-6bc83503.0?

@ardatan ardatan added the waiting-for-release Fixed/resolved, and waiting for the next stable release label Jan 23, 2020
@dotansimha
Copy link
Owner

Fixed in v1.12.0

@alexnault
Copy link
Contributor

I'm having this issue using 1.15.5.

output:

> graphql-codegen --config codegen.yml --watch

  ✔ Parse configuration
  ❯ Generate outputs
    ❯ Generate src/generated/graphql.tsx
      ✔ Load GraphQL schemas
      ✔ Load GraphQL documents
      ✖ Generate
        → undefined couldn't be found in module upper-case!


 Found 1 error

  ✖ src/generated/graphql.tsx
    Error: undefined couldn't be found in module upper-case!
        at Object.resolveExternalModuleAndFn (/Users/anault/Projects/apollo-project/client/node_modules/@graphql-codegen/plugin-helpers/index.cjs.js:27:15)

codegen.yml:

overwrite: true
schema: "../server/schema.graphql"
documents: "src/**/*.graphql"
generates:
  src/generated/graphql.tsx:
    config:
      reactApolloVersion: 3
      withHooks: true
      withComponent: false
      withHOC: false
      namingConvention:
        enumValues: upper-case
    plugins:
      - typescript
      - typescript-operations
      - typescript-react-apollo

@ardatan
Copy link
Collaborator

ardatan commented Jun 18, 2020

It should be enumValues: upper-case#upperCase

@ianmartorell
Copy link

@ardatan Aha! The styling in the documentation's code blocks made it seem like #upperCase was a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to codegen core/cli waiting-for-release Fixed/resolved, and waiting for the next stable release
Projects
None yet
Development

No branches or pull requests

6 participants