Zige
Explore posts from serversPPrisma
•Created by Zige on 12/3/2024 in #help-and-questions
Cannot run built code when different prisma client output folder
Hi, I came to this problem when I tried to change the prisma client output folder. No matter if I specify folder in src or not, it is not possible to run the build index.js.
When I run it in dev, it works just fine. The build completes just fine (when I omit the --dts tag). But when I want to run it, it always fail on error something like:
Error: Dynamic require of "child_process" is not supported
or
Error: Dynamic require of "fs" is not supported
in generator schema:
output = "../src/generated-prisma-client"
here are my scripts:
here is my tsup config:
and here is the tsconfig:
I believe there is problem in the typescript building config, but honest IDK. Has anyone faced this before? Any suggestion is appreciated.3 replies