question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module `graphql-codegen-core` error when generating types

See original GitHub issue

Describe the bug Cannot find module graphql-codegen-core error when generating types

To Reproduce Steps to reproduce the behavior:

  1. Install typescript-server plugin
  2. Execute type generation
  3. Errors with
 Unable to load template plugin matching 'typescript-server'.
               Reason:
                 Cannot find module 'graphql-codegen-core'

Expected behavior graphql-codegen-core should be a dependency of graphql-codegen-typescript-server not a devDependency. Its used in the codebase and therefore should not be a devDependency.

Schema/Documents N/A

Environment:

  • OS: Mac
  • Codegen: 0.14.5
  • Node: 10.x

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
emmanuelbuahcommented, Dec 6, 2018

@dotansimha I’m using Lerna so its possible Lerna is playing some dirty tricks on install

0reactions
emmanuelbuahcommented, Feb 25, 2019

The fix was to delete both the lock file and the node_module folder. Even though I have a fix. I’d like to get to the bottom of this issue. I will take some time to submit a repo reproducing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

module not found when using graphql-code-generator
When I import generated types from graphql.ts it works fine. However when importing the gql i get the cannot find module error.
Read more >
Codegen:generate error, cannot find module 'graphql ...
Hello! I had successfully been able to run the following command over the past couple of weeks. But today I was faced with...
Read more >
@graphql-codegen/core - npm
Start using @graphql-codegen/core in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type ...
Read more >
Installation - GraphQL Code Generator
Question by question, it will guide you through the whole process of setting up a schema, selecting and installing plugins, picking a ...
Read more >
GraphQL Code Libraries, Tools and Services
Add any type specific cache control directives in the format: ... automatic data consistency, optimistic updates, and error handling. See ... npm@urql/core.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found