sindresorhus / globby

User-friendly glob matching
MIT License
2.51k stars 130 forks source link

Unknown file extension ".ts" #183

Closed abbasspark closed 3 years ago

abbasspark commented 3 years ago

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" with "typescript": "4.3.5" "node": "14.16.0"

BarbecueSilver commented 3 years ago

@abbasspark I assume that you also try to update globby.

For me adding --loader ts-node/esm to the node command resolved my issue (e.g.: node --loader ts-node/esm ./my-script.ts). See the full answer at https://stackoverflow.com/a/66626333/8118803

Check also https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c