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-yoga'

See original GitHub issue

Steps to reproduce:

  1. mkdir playground
  2. cd playground
  3. yarn init -y
  4. yarn add graphql-yoga
  5. node
  6. require('graphql-yoga')
Error: Cannot find module 'graphql-yoga'
    at Function.Module._resolveFilename (module.js:543:15)
    at Function.Module._load (module.js:470:25)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)

Node v9.10.1 Yarn v1.6.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
kachkaevcommented, Apr 28, 2018

I think it’s best to stick with graphql-yoga@1.12.1 for now. Any tweaks in package.json in node_modules/graphql-yoga will be washed away after running yarn or npm install.

1reaction
BenDiuguidcommented, Apr 28, 2018

I believe @kachkaev meant graphql-yoga@1.12.1? This is the latest version that I could get to work this morning. Also manually changing the package.json main field from "main": "dist/src/index.js" to "main": "dist/index.js" solved the problem with the latest graphql-yoga but I’m not sure if that would break other things?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'graphql-yoga' · Issue #297 - GitHub
This is the latest version that I could get to work this morning. Also manually changing the package.json main field from "main": "dist/src/ ......
Read more >
graphql-yoga - npm
Start using graphql-yoga in your project by running `npm i graphql-yoga`. There are 131 other projects in the npm registry using graphql-yoga.
Read more >
Issue with graphql-yoga - Questions - Prisma 1 Forum
I have upgraded graphql-yoga but it keeps saying “cannot find module”, I've upgraded a few packages, but yarn interactive-upgrade didn't ...
Read more >
node.js - Error: Cannot find module 'graphql/validation/rules ...
For me simply running npm install -g graphql fixed the problem (I had already installed Apollo globally with npm install -g apollo )....
Read more >
@graphql-tools/graphql-file-loader - npm package | Snyk
The npm package @graphql-tools/graphql-file-loader was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was ...
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