The problem seems circular:
package.jsondoes NOT havetype: "module". In this case I get this error when using modules in my typescript files:
An error occured while running the seed command:
/Users/me/code/me/prisma-learning/graphql-nextjs/prisma/seed.ts:1
import { PrismaClient } from '@prisma/client';
^^^^^^
- So I add
type: "module"inpackage.jsonand this is now the error:
An error occured while running the seed command:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for
/Users/me/code/me/prisma-learning/graphql-nextjs/prisma/seed.ts
I just want to use ES6 modules in my TS files. The code is from an official Prisma boilerplate project: https://github.com/prisma/prisma-examples/tree/latest/typescript/graphql-nextjs