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

Cannot find module after upgrade to NodeJS 12 #60

Closed
alastairpayne opened this issue Oct 29, 2019 · 2 comments
Closed

Cannot find module after upgrade to NodeJS 12 #60

alastairpayne opened this issue Oct 29, 2019 · 2 comments

Comments

@alastairpayne
Copy link

After moving from Node 8.11.2 to Node 12.13.0 we started seeing this error for all of our gql files:

ERROR in ./src/<...path...>/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: /<...path...>/index.js: Cannot find module 'apollo/queries/user.gql'
(...Stack)

Are there any known issues with Node12 and this plugin?

@VojtaSim
Copy link

VojtaSim commented Oct 5, 2020

Node 12 changed behaviour of require.resolve and thus importing .gql files without absolute or relative path (./) will fail.
I've created PR to address this issue #78

@detrohutt
Copy link
Owner

I merged the PR and released v2.8.1.

Closing for now. Reopen if you have any more issues.

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