Carlos Gomez
08/11/2021, 8:40 PMprisma db seed
in a Docker container with seed.ts
. ts-node
is unable to resolve paths. Any ideas?
P> prisma db seed --preview-feature
Prisma schema loaded from prisma/schema.prisma
Running seed: ts-node --project ./tsconfig.json -T "prisma/seed.ts" ...
Error: Cannot find module 'src/prisma.client'
Require stack:
- /app/prisma/seed.ts
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:927:15)
at Function.Module._resolveFilename (/app/node_modules/tsconfig-paths/lib/register.js:75:40)
at Function.Module._load (node:internal/modules/cjs/loader:772:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (/app/prisma/seed.ts:1:1)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Module.m._compile (/app/node_modules/ts-node/src/index.ts:1295:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Object.require.extensions.<computed> [as .ts] (/app/node_modules/ts-node/src/index.ts:1298:12)
Error: Command failed with exit code 1: ts-node --project ./tsconfig.json -T "prisma/seed.ts"
Ryan
08/12/2021, 6:20 AMCarlos Gomez
08/12/2021, 10:09 PMsrc/prisma.client
and others) weren't on the filesystem.
I have copied the files over to my Docker image and it's working now.