Error: Command failed with exit code 1: ts-node --compiler-options {"module":"CommonJS"} prisma/seed.ts
Error: Command failed with exit code 1: ts-node --compiler-options {"module":"CommonJS"} prisma/seed.ts
我在执行 npx prisma db seed
时出现此错误
代码:
'MODULE_NOT_FOUND', requireStack: [
'/run/media/.../myapp/prisma/imaginaryUncacheableRequireResolveScript'
] }
An error occured while running the seed command: Error: Command failed
with exit code 1: ts-node --compiler-options {"module":"CommonJS"}
prisma/seed.ts
我在Package.json
中有这个
"prisma": {
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
}
我犯了一个愚蠢的错误,文件应该命名为 seed.ts 而不是 seeds.ts
我在执行 npx prisma db seed
代码:
'MODULE_NOT_FOUND', requireStack: [ '/run/media/.../myapp/prisma/imaginaryUncacheableRequireResolveScript' ] }
An error occured while running the seed command: Error: Command failed with exit code 1: ts-node --compiler-options {"module":"CommonJS"} prisma/seed.ts
我在Package.json
中有这个 "prisma": {
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
}
我犯了一个愚蠢的错误,文件应该命名为 seed.ts 而不是 seeds.ts