I am working on a Nextjs project and would like to build a preview environment on Vercel where I use supabase (remote postgres) for database.
I would like to run prisma db seed in the preview environment as well but I get the following error:
An error occurred while running the seed command:
Error: Command was killed with SIGSEGV (Segmentation fault): ts-node --compiler-options {"module":"CommonJS"} prisma/seed.ts
The build command to deploy migrations (prisma migrate deploy) was succeeded in the vercel's preview environment and the database schema is exactly the same as the local one.
As specified in the prisma document, I added following property in the package.json
"prisma": {
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
}
Then I changed the DATABASE_URL in .env to that of supabase and ran prisma db seed, resulting the error.
So I tried to run seed.ts directly with a lot more memory allocated with this command:
NODE_OPTIONS="--max-old-space-size=4096" yarn ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts but I still face the segmentation fault error.
Note that prisma version is 4.10.1, node version is 18.12.1