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: Cannot find module 'graphql-yoga' #298

Closed
MoonTahoe opened this issue Apr 28, 2018 · 2 comments
Closed

Error: Cannot find module 'graphql-yoga' #298

MoonTahoe opened this issue Apr 28, 2018 · 2 comments

Comments

@MoonTahoe
Copy link

I was working with graphql-yoga today on a new project and the installed npm will not work. I see the following error:

Error: Cannot find module 'graphql-yoga'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
    at Function.Module._load (internal/modules/cjs/loader.js:497:25)
    at Module.require (internal/modules/cjs/loader.js:626:17)
    at require (internal/modules/cjs/helpers.js:20:18)

I took a look at the npm folder and noticed a broken link in the pacakge.json. The "main": "dist/src/index.js" file is not in that location. It's just in the dist folder. I do not see a src folder. When I change the value to: "main": "dist/index.js"... it works!

I don't know if a recent changed caused this, but I was unable to get any server running until I applied this fix.

@kriswep
Copy link

kriswep commented Apr 28, 2018

This is discussed in #297 . For now, changing to graphql-yoga@1.12.1 helps (or waiting for a fixed release).

@schickling
Copy link
Contributor

This is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants