Steps to reproduce:
mkdir playgroundcd playgroundyarn init -yyarn add graphql-yoganoderequire('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
This can be true 馃槰
Yoga's package.json mentions "main": "dist/src/index.js", while the tree in node_modules looks like so:

Most probable cause is this change in #283.
@KATT @schickling 馃啒
@kurniawanw0194 does installing [email protected] solve the issue for you? This may work as a temporary workaround, you just won't get graphql-deduplicator introduced earlier today via https://github.com/graphcool/graphql-yoga/pull/272.
I believe @kachkaev meant [email protected]? 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?
Same issue.
I think it's best to stick with [email protected] for now. Any tweaks in package.json in node_modules/graphql-yoga will be washed away after running yarn or npm install.
Yup sticking with 1.12.1 till this gets patched! 馃槃
Apologies for the inconvenience. This one must have slipped while merging this PR: https://github.com/graphcool/graphql-yoga/pull/283
I just released a new fix 馃殺
I did that because typescript watcher doesn't like to both watch dist and write to dist. Wasn't aware it would affect anything other than typescript compilation. Now you probably broke yarn watch instead, but I haven't confirmed (on my phone writing this).
@KATT I see. Happy to merge a PR that fixes this 馃槉
@schickling I got a PR open now - #300 - please CR carefully :)
Most helpful comment
I think it's best to stick with
[email protected]for now. Any tweaks inpackage.jsoninnode_modules/graphql-yogawill be washed away after runningyarnornpm install.