Zige
Zige
Explore posts from servers
PPrisma
Created by Zige on 12/3/2024 in #help-and-questions
Cannot run built code when different prisma client output folder
after changing it to the node_modules/@prisma/client I got this error:
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Error:
Generating client into C:\Users\honza\visnova\test\node_modules\@prisma\client is not allowed.
This package is used by `prisma generate` and overwriting its content is dangerous.

Suggestion:
In C:\Users\honza\visnova\test\prisma\schema.prisma replace:

4 output = "../node_modules/@prisma/client"
with
4 output = "../node_modules/.prisma/client"

You won't need to change your imports.
Imports from `@prisma/client` will be automatically forwarded to `.prisma/client`
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Error:
Generating client into C:\Users\honza\visnova\test\node_modules\@prisma\client is not allowed.
This package is used by `prisma generate` and overwriting its content is dangerous.

Suggestion:
In C:\Users\honza\visnova\test\prisma\schema.prisma replace:

4 output = "../node_modules/@prisma/client"
with
4 output = "../node_modules/.prisma/client"

You won't need to change your imports.
Imports from `@prisma/client` will be automatically forwarded to `.prisma/client`
after doing what the error says, it completes normally. Then I updated the paths in tsconfig and after building, I got this error: Error: Dynamic require of "fs" is not supported I even tried to remove the paths in tsconfig and import everything directly, still the same.
3 replies