Leejjon
Nov 5, 2023

When I run npm run dev I get the:

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/projects/app/src/app.ts

I could fix it by changing this line in the package.json:

"dev": "ts-node ./src/app.ts"

into

"dev": "ts-node-esm ./src/app.ts"

It doesn't do HMR however, but maybe that wasn't the intention.

Leejjon
Leejjon

Written by Leejjon

Java/Kotlin/TypeScript Developer. Interested in frontend, backend, databases, mobile, cloud and more. Only interested in job offers from employers directly.

No responses yet