Running a script in a solid start project
Hi, I'd like to run a script, to seed my db, in a solid start project.
I thought id just be able to
npx ts-node src/foo.ts
but I get an error TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
Any ideas on how to get this to work? TIA.2 Replies
Can you send over your package.json?
you can also add
esModuleInterop
to your tsconfig.json:
if even that doesn't work,
Thanks. I have esModuleInterop set to true and have tried the --esm flag and have tried removing the "type" : module setting but none of that works.