We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run gulp command when gulpfile.ts is in TypeScript
npx gulp
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' }
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
v10.9.2
v20.12.2
5.5.3
{ "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?
.ts
The text was updated successfully, but these errors were encountered:
I have this problem too. My node version is v18.19.1.
v18.19.1
Sorry, something went wrong.
Figured out an ugly workaround for now:
node --require tsx/cjs node_modules/gulp-cli/bin/gulp.js
This works, but still ugly.
tsx node_modules/gulp-cli/bin/gulp.js
No branches or pull requests
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.2
v20.12.2
5.5.3
I've tried many different configurations and combinations. All my attempts failed. No idea why it says
.ts
is an unknown extension?The text was updated successfully, but these errors were encountered: