izelnakri / qunitx-cli

CI browser runner for qunitx test framework
MIT License
3 stars 0 forks source link

Better error handling? #1

Open NullVoxPopuli opened 1 year ago

NullVoxPopuli commented 1 year ago

As previously reported here: https://github.com/izelnakri/qunitx/issues/74 and following the instructions from the qunitx repo,

I'm running in to this issue:

❯ node_modules/.bin/qunitx 
node_modules/.bin/qunitx: 16: exec: TS_NODE_COMPILER_OPTIONS={"module":"ES2020"}: not found

Hoping an actionable error message could be added.

❯ node --version
v20.4.0

I created my project via:

pnpm add qunitx-cli # automatically creates a package.json if one doesn't exist
volta pin node@20 # since node 20 is required
my whole project ``` ❯ pnpm add qunitx-cli Packages: +159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Packages are hard linked from the content-addressable store to the virtual store. Content-addressable store is at: /home/nvp/.local/share/pnpm/store/v3 Virtual store is at: node_modules/.pnpm Progress: resolved 181, reused 159, downloaded 0, added 159, done dependencies: + qunitx-cli 0.0.3 Done in 1.9s ~/Development/tmp/test-qunitx ❯ la Permissions Size User Date Modified Name drwxrwxr-x - nvp 16 Jul 17:51 node_modules .rw-rw-r-- 51 nvp 16 Jul 17:51 package.json .rw-rw-r-- 45k nvp 16 Jul 17:51 pnpm-lock.yaml ~/Development/tmp/test-qunitx ❯ volta pin node@20 success: pinned node@20.4.0 (with npm@9.7.2) in package.json ~/Development/tmp/test-qunitx ❯ volta pin pnpm success: pinned pnpm@8.6.7 in package.json ~/Development/tmp/test-qunitx ❯ la Permissions Size User Date Modified Name drwxrwxr-x - nvp 16 Jul 17:51 node_modules .rw-rw-r-- 105 nvp 16 Jul 17:52 package.json .rw-rw-r-- 45k nvp 16 Jul 17:51 pnpm-lock.yaml ~/Development/tmp/test-qunitx ❯ node_modules/.bin/qunitx node_modules/.bin/qunitx: 16: exec: TS_NODE_COMPILER_OPTIONS={"module":"ES2020"}: not found ~/Development/tmp/test-qunitx ❯ cat package.json ───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: package.json ───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ { 2 │ "dependencies": { 3 │ "qunitx-cli": "^0.0.3" 4 │ }, 5 │ "volta": { 6 │ "node": "20.4.0", 7 │ "pnpm": "8.6.7" 8 │ } 9 │ } ───────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ~/Development/tmp/test-qunitx ❯ touch some-file.js ~/Development/tmp/test-qunitx ❯ ./node_modules/.bin/qunitx some-file.js ./node_modules/.bin/qunitx: 16: exec: TS_NODE_COMPILER_OPTIONS={"module":"ES2020"}: not found ~/Development/tmp/test-qunitx ❯ nvim ~/Development/tmp/test-qunitx took 9s ❯ pnpm i Lockfile is up to date, resolution step is skipped Already up to date Done in 321ms ~/Development/tmp/test-qunitx ❯ ./node_modules/.bin/qunitx some-file.js ./node_modules/.bin/qunitx: 16: exec: TS_NODE_COMPILER_OPTIONS={"module":"ES2020"}: not found ~/Development/tmp/test-qunitx ❯ cat package.json ───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: package.json ───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ { 2 │ "type": "module", 3 │ "dependencies": { 4 │ "qunitx-cli": "^0.0.3" 5 │ }, 6 │ "volta": { 7 │ "node": "20.4.0", 8 │ "pnpm": "8.6.7" 9 │ } 10 │ } ─── ```

I noticed that qunitx doesn't have any peerDependencies, and I see loose references to ts-node, so.. idk what I'm doing wrong :upside_down_face: (I could make assumptions and randomly install things, but the package.json's don't hint at anything, so, that's why I make an issue here, too)

any guidance is much appreciated.

does qunitx-cli require qunitx, qunit, and/or ts-node? I don't see these declared as deps or peerDeps.

Thanks!!

NullVoxPopuli commented 11 months ago

doesn't work with bun either :thinking:


❯ bun qunitx
/home/nullvoxpopuli/Development/tmp/test-qunitx/node_modules/.bin/qunitx: 16: exec: TS_NODE_COMPILER_OPTIONS={"module":"ES2020"}: not found
error: "qunitx" exited with code 127
Error: Command failed: /home/nullvoxpopuli/.volta/tools/image/packages/bun/lib/node_modules/bun/node_modules/@oven/bun-linux-x64/bin/bun qunitx
    at checkExecSyncError (node:child_process:861:11)
    at execFileSync (node:child_process:896:15)
    at /home/nullvoxpopuli/.volta/tools/image/packages/bun/lib/node_modules/bun/bin/bun:405:66 {
  status: 127,
  signal: null,
  output: [ null, null, null ],
  pid: 1204830,
  stdout: null,
  stderr: null
}