Closed bpeter340 closed 9 months ago
Thank you very much for reporting. I can reproduce it on node v20. Will have a closer look later today.
This seems to be a common issue with ts-node
: https://github.com/TypeStrong/ts-node/issues/1997. I replaced ts-node
now with tsx
: https://github.com/PacktPublishing/Full-Stack-Web-Development-with-Remix/commit/c7b0354d0e9f446a1f8e0bf37eb903eb42bba1c0. Was able to run npm run seed
on both node v18 and v20 with tsx
.
Let me know if that works for you!
This works. Thanks!
Describe the bug
BeeRich's
npm run seed
script fails while using node version >= 20To Reproduce
Steps to reproduce the behavior:
05-fetching-and-mutating-data/bee-rich/start
npm run seed
script throws a TypeErrorExpected behavior
Using node version 19
Actual behavior
Using node version >=20
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/bart/Documents/Projects/Full-Stack-Web-Development-with-Remix/05-fetching-and-mutating-data/bee-rich/start/prisma/seed.ts at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9) at defaultGetFormat (node:internal/modules/esm/get_format:203:36) at defaultLoad (node:internal/modules/esm/load:141:22) at async nextLoad (node:internal/modules/esm/hooks:865:22) at async nextLoad (node:internal/modules/esm/hooks:865:22) at async Hooks.load (node:internal/modules/esm/hooks:448:20) at async MessagePort.handleMessage (node:internal/modules/esm/worker:196:18) { code: 'ERR_UNKNOWN_FILE_EXTENSION' }