Skip to content
New issue

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

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /workspace/dev/gulpfile.ts #108

Closed
FreePhoenix888 opened this issue Jan 13, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@FreePhoenix888
Copy link
Member

FreePhoenix888 commented Jan 13, 2023

gitpod /workspace/dev (main) $ npm run gitpod-start

> @deep-foundation/dev@0.0.21 gitpod-start /workspace/dev
> export NEXT_PUBLIC_ENGINES=0; export NEXT_PUBLIC_HIDEPATH=1; export npm_config_yes=true; export JWT_SECRET="{\"type\":\"HS256\",\"key\":\"3EK6FD+o0+c7tzBNVfjpMkNDi2yARAAKzQlk8O2IKoxQu4nF7EdAh8s3TwpHwrdWT6R\"}" export MIGRATIONS_ID_TYPE_SQL=bigint; export MIGRATIONS_ID_TYPE_GQL=bigint; export MIGRATIONS_HASURA_PATH=$(echo $(gp url 8080) | awk -F[/:] '{print $4}'); export DEEPLINKS_HASURA_PATH=$(echo $(gp url 8080) | awk -F[/:] '{print $4}'); export MIGRATIONS_HASURA_SSL=1; export DEEPLINKS_HASURA_SSL=1; export MIGRATIONS_HASURA_SECRET=myadminsecretkey; export DEEPLINKS_HASURA_SECRET=myadminsecretkey;  export NEXT_PUBLIC_DEEPLINKS_SERVER=https://$(echo $(gp url 3007) | awk -F[/:] '{print $4}'); export NEXT_PUBLIC_GQL_PATH=$(echo $(gp url 3006) | awk -F[/:] '{print $4}')/gql; export NEXT_PUBLIC_GQL_SSL=1 DEEPLINKS_HASURA_PATH=$(echo $(gp url 8080) | awk -F[/:] '{print $4}'); export DEEPLINKS_HASURA_SSL=1; export MIGRATIONS_DEEPLINKS_APP_URL=$(gp url 3007); export MIGRATIONS_DEEPLINKS_URL=$(gp url 3006); export DEEPLINKS_PUBLIC_URL=$(gp url 3006); export DOCKER_DEEPLINKS_URL=http://host.docker.internal:3006; export DEEPLINKS_ROUTE_HANDLERS_HOST=host.docker.internal; npm run gitpod-hasura-reattach; concurrently "npm run deepcase" "npm run deeplinks" "npm run gitpod-engine" "npm run nextjs"

npm WARN cli npm v9.3.0 does not support Node.js v14.15.0. You should probably upgrade to a
npm WARN cli newer version of node as we can't make any promises that npm will work with this
npm WARN cli version. This version of npm supports the following node versions: `^14.17.0 ||
npm WARN cli ^16.13.0 || >=18.0.0`. You can find the latest version at https://nodejs.org/.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).
npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.

> @deep-foundation/dev@0.0.21 gitpod-hasura-reattach
> export REATTACH_HASURA_SECRET=myadminsecretkey; export REATTACH_HASURA_PATH=$(echo $(gp url 8080) | awk -F[/:] '{print $4}'); export REATTACH_HASURA_SSL=1; export REATTACH_DEEPLINKS_PATH=$(echo $(gp url 3006) | awk -F[/:] '{print $4}'); npx gulp gitpod:hasura:reattach

npm WARN cli npm v9.3.0 does not support Node.js v14.15.0. You should probably upgrade to a
npm WARN cli newer version of node as we can't make any promises that npm will work with this
npm WARN cli version. This version of npm supports the following node versions: `^14.17.0 ||
npm WARN cli ^16.13.0 || >=18.0.0`. You can find the latest version at https://nodejs.org/.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).
npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
[13:48:01] Requiring external module ts-node/register
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /workspace/dev/gulpfile.ts
    at Loader.defaultGetFormat [as _getFormat] (internal/modules/esm/get_format.js:65:15)
    at Loader.getFormat (internal/modules/esm/loader.js:101:42)
    at Loader.getModuleJob (internal/modules/esm/loader.js:230:31)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Loader.import (internal/modules/esm/loader.js:164:17) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

Minimal reproduction example:
gulpfile.ts:

import * as gulp from 'gulp';
import {deleteAsync} from 'del';

gulp.task('a', async () => {
  console.log("a result");
  await deleteAsync(["notExistingFile.txt"]);
});

package.json:

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@types/gulp": "^4.0.10",
    "gulp": "^4.0.2",
    "ts-node": "^10.9.1",
    "typescript": "^4.9.4"
  }
}
@FreePhoenix888 FreePhoenix888 self-assigned this Jan 13, 2023
@FreePhoenix888 FreePhoenix888 added the bug Something isn't working label Jan 13, 2023
@FreePhoenix888
Copy link
Member Author

Closing because I have found a solution by downgrading version and I have written issue about it in the del's repository: sindresorhus/del#152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant