Should build. Pass.
/home/michael-heuberger/code/binarykitchen/videomail.io ❯❯❯ npx gulp feature/typescript ✭ ✱
[15:57:06] Loaded external module: ts-node/register
TypeError: Unknown file extension ".ts" for /home/michael-heuberger/code/binarykitchen/videomail.io/gulpfile.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:143:22)
at async ModuleLoader.load (node:internal/modules/esm/loader:403:7)
at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:45)
at async link (node:internal/modules/esm/module_job:78:21) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
{
"include": [
"etc",
"src",
"test",
"gulpfile.ts",
".eslintrc.js",
"prettier.config.js",
"babel.config.js"
],
"compilerOptions": {
// Required
"target": "esnext",
"module": "CommonJS",
"noEmit": true,
"allowImportingTsExtensions": true,
"allowArbitraryExtensions": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["dom", "dom.iterable", "esnext"],
"skipLibCheck": true,
"strict": true,
"allowJs": true,
"allowSyntheticDefaultImports": true,
"allowUnusedLabels": false,
"allowUnreachableCode": false,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noEmitOnError": true,
"stripInternal": true,
"resolveJsonModule": true,
// TODO remove these exceptions and fix more errors one day
"noImplicitAny": false
}
}
I've tried many different configurations and combinations. All my attempts failed. No idea why it says .ts is an unknown extension?
Unable to run gulp command when gulpfile.ts is in TypeScript
Expected Behaviour
Should build. Pass.
Actual Behaviour
Gulp's official documentation says it should work, see:
https://gulpjs.com/docs/en/getting-started/javascript-and-gulpfiles/
Likewise, your documentation says the same:
https://github.com/TypeStrong/ts-node/blob/main/website/docs/recipes/gulp.md?plain=1
Specifications
v10.9.2v20.12.25.5.3I've tried many different configurations and combinations. All my attempts failed. No idea why it says
.tsis an unknown extension?