Open MateoKappa opened 7 months ago
How is this related to grammY?
The build script is from the next.js example from Grammy and I can't run it on my next JS project
AFAIK, you don't have to run this command anyway. It will be run automatically during build.
@PonomareVlad is there a way to run these things locally? Should we document it, given that people try it anyway?
It is also failing on vercel , basically I'm trying to fix it locally so it fixes while running on vercel as well
ts-node
doesn't support .ts
extension ? 🌚
I had the same error, and switched from ts-node
to tsx
.
But if you want to use ts-node
, see this issue: https://github.com/TypeStrong/ts-node/issues/2100
Also, you can just use Bun
, it's very fast.
You can do this: bun run scripts/build.ts
, not required ts-node
.
`npx ts-node scripts/build.ts
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/mateokappa/Desktop/www/scripts/build.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' }`