You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
I ran the initial migration to my db: npx prisma migrate dev --name init
and then installed the prisma client: npm install @prisma/client
Finally I installed npm install prisma-zod-generator
and ran npx prisma generate which faild with the following error:
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error:
✔ Generated Prisma Client (v5.7.0) to ./node_modules/@prisma/client in 53ms
Generator "prisma-zod-generator" failed:
/home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js:83
return parent === void 0 ? require(filePath) : parent.require(filePath);
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/vaphaet/work/prisma-test/prettier.config.js from /home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js not supported.
Instead change the require of prettier.config.js in /home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js to a dynamic import() which is available in all CommonJS modules.
at module2.exports (/home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js:83:61)
at loadJs2 (/home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js:8050:22)
at Explorer.loadFileContent (/home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js:8449:36)
at Explorer.createCosmiconfigResult (/home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js:8453:40)
at Explorer.loadSearchPlace (/home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js:8438:35)
at async Explorer.searchDirectory (/home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js:8428:31)
at async run (/home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js:8413:26)
at async cacheWrapper (/home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js:8294:22)
at async Explorer.search (/home/vaphaet/work/prisma-test/node_modules/prisma-zod-generator/node_modules/prettier/third-party.js:8407:24)
at async Promise.all (index 0) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.18.2
Did i do something wrogn?
Is prisma-zod-generaotr not compatible with prettier?
Is prisma-zod-generator not compatible with the t3 stack?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have created a new t3-app project.
In my
prisma/schema.prisma
file I addedand changed my
datasource
I ran the initial migration to my db:
npx prisma migrate dev --name init
and then installed the prisma client:
npm install @prisma/client
Finally I installed
npm install prisma-zod-generator
and ran
npx prisma generate
which faild with the following error:Did i do something wrogn?
Is prisma-zod-generaotr not compatible with prettier?
Is prisma-zod-generator not compatible with the t3 stack?
Any help is apprechiated.
Beta Was this translation helpful? Give feedback.
All reactions