Nuxt has changed to verbatimModuleSyntax True
look in this file...
.nuxt/tsconfig.json
and you will see this..
"verbatimModuleSyntax": true,
This breaks prisma DB seeding i.e. this..
gives you an error like this
ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled.
then some bullshit with node types being missing "process can't be found'
I have fixed this in a downstream project by doing the following. Not sure if I should bring it back to the main repo or if it is the best fix.....
I needed to add this to .tsconfig (for the missing process bullshit)
"compilerOptions": {
"types": ["node"]
}
change to this in package.json
"prisma": {
"seed": "ts-node prisma/seed.ts"
},
and do this in seed.ts
const { PrismaClient } = require('@prisma/client');