Open WankkoRee opened 1 year ago
I have the same issue
https://github.com/AllanOricil/nrg-cli/actions/runs/10755041762/job/29826291624
RUN v2.0.5 /home/runner/work/nrg-cli/nrg-cli
❯ test/index.spec.ts (14 tests | 2 failed) 1752ms
× cli > should handle missing command with a help message
→ expected 'Command failed: npx ts-node ./src/ind…' to contain 'You need at least one command before …'
× cli > should display the version
→ Command failed: npx ts-node ./src/index.ts --version
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/runner/work/nrg-cli/nrg-cli/src/index.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 nextLoad (node:internal/modules/esm/hooks:866:22)
at async nextLoad (node:internal/modules/esm/hooks:866:22)
at async Hooks.load (node:internal/modules/esm/hooks:449:20)
at async handleMessage (node:internal/modules/esm/worker:196:18) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 2 ⎯⎯⎯⎯⎯⎯⎯
FAIL test/index.spec.ts > cli > should handle missing command with a help message
AssertionError: expected 'Command failed: npx ts-node ./src/ind…' to contain 'You need at least one command before …'
- Expected
+ Received
- You need at least one command before moving on
+ Command failed: npx ts-node ./src/index.ts
+ TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/runner/work/nrg-cli/nrg-cli/src/index.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 nextLoad (node:internal/modules/esm/hooks:866:22)
+ at async nextLoad (node:internal/modules/esm/hooks:866:22)
+ at async Hooks.load (node:internal/modules/esm/hooks:449:20)
+ at async MessagePort.handleMessage (node:internal/modules/esm/worker:196:18) {
+ code: 'ERR_UNKNOWN_FILE_EXTENSION'
+ }
+
❯ test/index.spec.ts:256:29
254| throw Error();
255| } catch (error: unknown) {
256| expect(error.message).toContain(
| ^
257| "You need at least one command before moving on",
258| );
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯
FAIL test/index.spec.ts > cli > should display the version
Error: Command failed: npx ts-node ./src/index.ts --version
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/runner/work/nrg-cli/nrg-cli/src/index.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 nextLoad (node:internal/modules/esm/hooks:866:22)
at async nextLoad (node:internal/modules/esm/hooks:866:22)
at async Hooks.load (node:internal/modules/esm/hooks:449:20)
at async handleMessage (node:internal/modules/esm/worker:196:18) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯
Test Files 1 failed (1)
Tests 2 failed | [12](https://github.com/AllanOricil/nrg-cli/actions/runs/10755041762/job/29826291624#step:7:13) passed (14)
Start at 22:59:21
Duration 2.08s (transform 123ms, setup 0ms, collect 82ms, tests 1.75s, environment 0ms, prepare 66ms)
Error: AssertionError: expected 'Command failed: npx ts-node ./src/ind…' to contain 'You need at least one command before …'
- Expected
+ Received
- You need at least one command before moving on
+ Command failed: npx ts-node ./src/index.ts
+ TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/runner/work/nrg-cli/nrg-cli/src/index.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:[14](https://github.com/AllanOricil/nrg-cli/actions/runs/10755041762/job/29826291624#step:7:15)3:22)
+ at async nextLoad (node:internal/modules/esm/hooks:866:22)
+ at async nextLoad (node:internal/modules/esm/hooks:866:22)
+ at async Hooks.load (node:internal/modules/esm/hooks:449:20)
+ at async MessagePort.handleMessage (node:internal/modules/esm/worker:196:18) {
+ code: 'ERR_UNKNOWN_FILE_EXTENSION'
+ }
+
Search Terms
pnpm
ERR_PNPM_PREPARE_PACKAGE
prepack
TS2742
macroReplNoErrorsAndStdoutContains
macroReplStderrContains
@cspotcode/ava-lib
Expected Behavior
install
github:TypeStrong/ts-node#main
as a dependency successfully.Actual Behavior
install
github:TypeStrong/ts-node#main
as a dependency failed.Steps to reproduce the problem
I install dependencies in my computer with no problem. But there is some errors on GitHub Actions.
https://github.com/WankkoRee/action-runner-test/actions/runs/6283895211/job/17064801621
Minimal reproduction
https://github.com/WankkoRee/action-runner-test
Specifications
GitHub Actions runner 2.309.0 with Node.js 18.17.1 and pnpm 8.7.6