Skip to content

TypeScript runtime tests fail in CI since ~April: ts-node incompatible with typescript@latest (TS 7) #4962

Description

@analog-cbarber

Every build (*, typescript) CI job currently fails, on every PR that triggers them. Each test dies at the Execute stage, before any ANTLR code runs, with:

TypeError: Cannot read properties of undefined (reading 'fileExists')
    at readConfig (.../ts-node/dist/configuration.js:91:33)

Cause

The test harness installs its toolchain unpinned (TsNodeRunner.java):

Processor.run(new String[] {NPM_EXEC, "--silent", "install", "-g", "typescript", "ts-node", "webpack", "webpack-cli"}, null);

npm's typescript@latest is now the TypeScript 7 (Go-based) rewrite, which no longer exposes the ts.sys internal API that ts-node 10.9.x (unmaintained since 2022) reaches into — ts-node crashes on startup before compiling anything.

Evidence it's the toolchain, not the tree

Fix options

  1. Swap ts-node for tsx (esbuild-based, no dependency on TypeScript's compiler API, actively maintained) — structurally immune to TypeScript's release cadence. PR to follow.
  2. Pin the install (typescript@5 ts-node@10.9.2) — also goes green today, but freezes the tests to an aging TypeScript under an unmaintained runner.

Diagnosis developed with AI assistance (Claude Fable 5); I reviewed and reproduced it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions