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

troubleshoot test pipeline, recently failing #279

Merged
merged 14 commits into from
Nov 25, 2023

Conversation

iambumblehead
Copy link
Owner

@iambumblehead iambumblehead commented Nov 25, 2023

this PR started off as routine incrementing of a ci "action" but turned into something else when the pipelines failed for a separate reason. For reasons discovered later, tests/tests-jest-ts/tsconfig.json needed this change

{
- "extends": "ts-node/node16/tsconfig.json",
+ "extends": "./node_modules/@tsconfig/node16/tsconfig.json",
  "ts-node": {
    "transpileOnly": true
  },
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "module": "ESNext",
    "moduleResolution": "node"
  }
}

@iambumblehead iambumblehead changed the title update ci to use checkout 4v troubleshoot test pipeline, recently failing Nov 25, 2023
@iambumblehead
Copy link
Owner Author

$ node --version
v21.2.0

tests do not fail here...

@iambumblehead
Copy link
Owner Author

these seem related nodejs/node#48207, LibreService/my_rime#23

@iambumblehead
Copy link
Owner Author

iambumblehead commented Nov 25, 2023

TypeStrong/ts-node#2026 (comment)

[...] switch to Node.js 18 just to see the actual error.

In the node 18 environment, the error looks like this

> NODE_OPTIONS="--loader=ts-node/esm --loader=esmock" jest esmock.node-jest.test.ts

(node:3069) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
/home/runner/work/esmock/esmock/tests/tests-jest-ts/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
error TS6053: File 'ts-node/node16/tsconfig.json' not found.

    at createTSError (/home/runner/work/esmock/esmock/tests/tests-jest-ts/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/home/runner/work/esmock/esmock/tests/tests-jest-ts/node_modules/ts-node/src/index.ts:863:19)
    at createFromPreloadedConfig (/home/runner/work/esmock/esmock/tests/tests-jest-ts/node_modules/ts-node/src/index.ts:874:36)
    at create (/home/runner/work/esmock/esmock/tests/tests-jest-ts/node_modules/ts-node/src/index.ts:624:10)
    at register (/home/runner/work/esmock/esmock/tests/tests-jest-ts/node_modules/ts-node/src/index.ts:591:15)
    at Object.registerAndCreateEsmHooks (/home/runner/work/esmock/esmock/tests/tests-jest-ts/node_modules/ts-node/src/esm.ts:116:34)
    at file:///home/runner/work/esmock/esmock/tests/tests-jest-ts/node_modules/ts-node/esm.mjs:8:7
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
  diagnosticCodes: [ 6053 ]
}

I did try troubleshooting this error a little bit but the solutions I tried failed and I was not sure the error was the original source of the problem. I could try re-enabling the jest ts test and making changes there, but it would be a trial and error thing and I don't know if the issue can be resolved or how many "trials" it would take to find a solution

@iambumblehead
Copy link
Owner Author

tests pass when tests-jest-ts are disabled... the error does not occur with other test folders where node-ts is used

    "test:DISABLEnode18-test-jest-ts": "cd tests-jest-ts && npm test",

@iambumblehead
Copy link
Owner Author

feel free to reopen or revert for any reason.

this change seems safe to merge now, so merging

@iambumblehead iambumblehead merged commit ed2522e into main Nov 25, 2023
10 checks passed
@iambumblehead iambumblehead deleted the update-ci-use-checkout-v4 branch November 25, 2023 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants