fix: use tsx for prisma seed to resolve ESM/CJS cycle in Node 20
Deploy Canina / deploy (push) Failing after 41s

- Replace ts-node/esm loader with tsx which handles nodenext module natively
- tsx avoids ERR_REQUIRE_CYCLE_MODULE with Prisma client ESM/CJS interop
- Add tsx ^4.19.0 as devDependency
This commit is contained in:
parsa aghaei committed 2026-07-29 14:14:20 +03:30
1 parent 776829e099
commit 813f5d7bc6
2 files changed
+506 -1

No files matched your search

+2 -1
View File
@@ -67,6 +67,7 @@
"ts-loader": "^9.5.2",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsx": "^4.19.0",
"typescript": "^5.7.3",
"typescript-eslint": "^8.20.0"
},
@@ -88,6 +89,6 @@
"testEnvironment": "node"
},
"prisma": {
"seed": "node --loader ts-node/esm --no-warnings prisma/seed.ts"
"seed": "tsx prisma/seed.ts"
}
}