This problem comes from the video https://www.youtube.com/watch?v=N_uNKAus0II&t=7807s
at approximately 2:10:00 when Antonio runs “bun run db:migrate” so I try to do the same.
However, when entering the following in terminal:
npm run db:migrate
I recieve the following error message:
> [email protected] db:migrate
> ts-node ./scripts/migrate.ts
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/coach/financetracker/scripts/migrate.ts
at new NodeError (node:internal/errors:371:5)
at Object.file: (node:internal/modules/esm/get_format:72:15)
at defaultGetFormat (node:internal/modules/esm/get_format:85:38)
at defaultLoad (node:internal/modules/esm/load:13:42)
at ESMLoader.load (node:internal/modules/esm/loader:303:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:230:58)
at new ModuleJob (node:internal/modules/esm/module_job:63:26)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:244:11)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
Why would this be?
I was expecting for it to work and then I can then run:
db:studio
And see the updated table in DrizzleORM
New contributor
Jordan Finn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.