I've been trying to run my seed script in prisma with nextJs and TS, and receiving the following error, is there any way to fix this?
Full error message
in package.json, I've added the following lines:
"prisma": {
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
}
and when I run this: npx prisma db seed
OUTPUT:
An error occured while running the seed command:
Error: Command failed with ENOENT: ts-node --compiler-options {"module":"CommonJS"} prisma/seed.ts
spawn ts-node ENOENTSolutionsource: stackoverflow \u2197
This problem could be no ts-node installed. Please check your package.json file and see if there is any ts-node installed. If not, just install ts-node with: npm i ts-node@<specific-version> or add -D if you are in development mode: npm i ts-node@<specific-version> -D In some situation, you may need to install Typescript as well: npm i typescript@<version-compatible-with-your-tsnode>
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/9130ffccc96064c05e9ea7c0104850484084429249da8c4fafe4d3c043cbe294hash \u00b7 9130ffccc96064c05e9ea7c0104850484084429249da8c4fafe4d3c043cbe294