henriqueinonhe / promises-training

Practice working with promises through a curated collection of interactive challenges. This repository provides a platform to refine your skills, complete with automated tests to to give you instant feedback and validate your progress.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error during installation: `TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /.../generateGraphTestsData.ts`

Kasahs opened this issue · comments

Tried install using npm create promises-training@latest

got the following error:

Initializing graph exercises tests data...

> create-promises-training@1.0.1 graph:generateTests
> ts-node ./scripts/generateGraphTestsData.ts

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/sxxxxxa/Code/promise-trainer/scripts/generateGraphTestsData.ts
    at new NodeError (node:internal/errors:405:5)
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:99:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:142:36)
    at defaultLoad (node:internal/modules/esm/load:91:20)
    at nextLoad (node:internal/modules/esm/hooks:733:28)
    at load (/Users/shxxxxa/Code/promise-trainer/node_modules/ts-node/dist/child/child-loader.js:19:122)
    at nextLoad (node:internal/modules/esm/hooks:733:28)
    at Hooks.load (node:internal/modules/esm/hooks:377:26)
    at MessagePort.handleMessage (node:internal/modules/esm/worker:168:24)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:778:20) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

Error initializing graph exercises tests data
Error: Command failed: npm run graph:generateTests
    at checkExecSyncError (node:child_process:887:11)
    at execSync (node:child_process:959:15)
    at run (/Users/shxxxxa/.npm/_npx/117e15c697a42bb1/node_modules/create-promises-training/bin.cjs:19:3)
    at initializeGraphTestsData (/Users/shxxxxa/.npm/_npx/117e15c697a42bb1/node_modules/create-promises-training/bin.cjs:155:5)
    at setup (/Users/shxxxxa/.npm/_npx/117e15c697a42bb1/node_modules/create-promises-training/bin.cjs:45:9)
    at async main (/Users/shxxxxxa/.npm/_npx/117e15c697a42bb1/node_modules/create-promises-training/bin.cjs:32:3) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 30204,
  stdout: null,
  stderr: null
}
commented

+1

MacOS

~/git/promises-training [master] $ node -v
v20.10.0
~/git/promises-training [master] $ npm -v
10.2.4

Thanks for reporting, I'm investigating, will give feedback soon

The issue is being caused by this: TypeStrong/ts-node#1997

I'm working on a fix