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 ... @prisma/client/generator-build in @prisma/client 5.9.0+ #996

Open
tgrushka opened this issue Feb 15, 2024 · 1 comment
Labels
type/bug Something is not working the way it should

Comments

@tgrushka
Copy link

When running npx prisma build, this plugin is broken by @prisma/client v5.9.0.

Force-downgrading to @prisma/client 5.8.1 fixes this error.

Since this is a prisma plugin, please document on web page: https://graphql-nexus.github.io/nexus-prisma/docs/usage
and probably in the README of this repo, too:
What version of prisma is currently supported?

This module load error is really not something we users can work around.

Thank you.

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error: Generator "nexus-prisma" failed:

node:internal/modules/cjs/loader:598
      throw e;
      ^
Error: Cannot find module '/Users/.../.../api/node_modules/@prisma/client/generator-build'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1181:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1169:15)
    at resolveExports (node:internal/modules/cjs/loader:591:14)
    at Module._findPath (node:internal/modules/cjs/loader:668:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1130:27)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/Users/.../.../api/node_modules/nexus-prisma/dist-cjs/lib/prisma-utils/externalToInternalDMMF.js:6:52)
    at Module._compile (node:internal/modules/cjs/loader:1376:14) {
  code: 'MODULE_NOT_FOUND',
  path: '/Users/.../.../api/node_modules/@prisma/client/package.json'
}
Node.js v21.3.0
@tgrushka tgrushka added the type/bug Something is not working the way it should label Feb 15, 2024
@frontendphil
Copy link

There is already a PR that fixes this: #985 "Just" needs to be merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is not working the way it should
Projects
None yet
Development

No branches or pull requests

2 participants