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 graphql/language/parser #336

Open
khelil opened this issue Jun 2, 2023 · 0 comments
Open

Cannot find module graphql/language/parser #336

khelil opened this issue Jun 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@khelil
Copy link

khelil commented Jun 2, 2023

Environment


  • Operating System: Darwin
  • Node Version: v18.16.0
  • Nuxt Version: 3.5.2
  • Nitro Version: 2.4.1
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: ssr, css, build, devServer, modules, runtimeConfig
  • Runtime Modules: [email protected]
  • Build Modules: -

Describe the bug

The bug occurs only after build when running node .output/server/index.mjs

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/MyPath/project/.output/server/node_modules/graphql/language/parser' imported from /MyPath/project/.output/server/index.mjs
Did you mean to import graphql/language/parser.js?
    at new NodeError (node:internal/errors:399:5)
    at finalizeResolution (node:internal/modules/esm/resolve:326:11)
    at moduleResolve (node:internal/modules/esm/resolve:945:10)
    at defaultResolve (node:internal/modules/esm/resolve:1153:11)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
    at link (node:internal/modules/esm/module_job:76:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

This issue already been reported here on a windows os : #117
I have this issue on mac os also...

Expected behaviour

No bugs when running build.

Reproduction

https://stackblitz.com/edit/github-4knyqk?file=nuxt.config.ts

Additional context

No response

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant