error occurred while trying to populate the database

Viewed 13

The following error occurred while trying to populate the database. the stack is: typescript prisma postgresql. the error output : npx prisma db seed Environment variables loaded from .env Running seed command ts-node prisma/seed.ts... (node:14378) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Usenode --trace-warnings ...` to show where the warning was created) /home/superuserfucker/Documents/Code/actualfullstack/awesome-links/prisma/seed.ts:37 import { PrismaClient } from '@prisma/client'; ^^^^^^

SyntaxError: Cannot use import statement outside a module at Object.compileFunction (node:vm:360:18) at wrapSafe (node:internal/modules/cjs/loader:1055:15) at Module._compile (node:internal/modules/cjs/loader:1090:27) at Module.m._compile (/home/superuserfucker/Documents/Code/actualfullstack/awesome-links/node_modules/ts-node/src/index.ts:1618:23) at Module._extensions..js (node:internal/modules/cjs/loader:1180:10) at Object.require.extensions. [as .ts] (/home/superuserfucker/Documents/Code/actualfullstack/awesome-links/node_modules/ts-node/src/index.ts:1621:12) at Module.load (node:internal/modules/cjs/loader:1004:32) at Function.Module._load (node:internal/modules/cjs/loader:839:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at phase4 (/home/superuserfucker/Documents/Code/actualfullstack/awesome-links/node_modules/ts-node/src/bin.ts:649:14)

An error occured while running the seed command: Error: Command failed with exit code 1: ts-node prisma/seed.ts `

0 Answers
Related