BradMcA
BradMcA
WWasp-lang
Created by BradMcA on 5/14/2024 in #🙋questions
Error while seeding DB any ideas how to solve? #p2021
[ Db ] Environment variables loaded from .env [ Db ] Running seed command npm run db-seed ... [ Db ] [ Db ] > [email protected] db-seed [ Db ] > npm run bundle && node --enable-source-maps -r dotenv/config bundle/dbSeed.js [ Db ] [ Db ] [ Db ] > [email protected] bundle [ Db ] > rollup --config --silent [ Db ] [ Db ] Running seed: devSeedUsers [ Db !] PrismaClientKnownRequestError: [ Db !] Invalid prismaClient.user.create() invocation in [ Db !] /mnt/c/users/brad/xyz/app/src/server/scripts/usersSeed.ts:41:33 [ Db !] [ Db !] 38 try { [ Db !] 39 await Promise.all( [ Db !] 40 USERS.map(async (user) => { [ Db !] → 41 await prismaClient.user.create( [ Db !] The table public.User does not exist in the current database. [ Db !] at Rn.handleRequestError (/mnt/c/users/brad/xyz/app/node_modules/@prisma/client/runtime/library.js:174:7325) [ Db !] at Rn.handleAndLogRequestError (/mnt/c/users/brad/xyz/app/node_modules/@prisma/client/runtime/library.js:174:6754) [ Db !] at Rn.request (/mnt/c/users/brad/xyz/app/node_modules/@prisma/client/runtime/library.js:174:6344) [ Db !] at <anonymous> (/mnt/c/users/brad/xyz/app/src/server/scripts/usersSeed.ts:41:15) [ Db !] at async Promise.all (index 4) [ Db !] at Object.devSeedUsers (/mnt/c/users/brad/xyz/app/src/server/scripts/usersSeed.ts:39:5) [ Db !] at main (/mnt/c/users/brad/xyz/app/.wasp/out/server/src/dbSeed.ts:23:10) { [ Db !] code: 'P2021', [ Db !] clientVersion: '4.16.2', [ Db !] meta: { table: 'public.User' } [ Db !] } [ Db ] [ Db ] 🌱 The seed command has been executed. ✅ --- Database seeded successfully! ----------------------------------------------
8 replies