Skip to content

Commit 6d6eaf6

Browse files
Diagnose TypeScript resolution mismatch between validate + e2e
Both CI jobs run the same `npm run build:all` against the same lockfile, but validate consistently passes and e2e consistently fails with TS5107 demanding `ignoreDeprecations: "6.0"` instead of the "5.0" my locked TS 5.9.3 expects. The lockfile pins TS to 5.9.3 in exactly one place, so npm ci should produce the same node_modules/typescript across both jobs. Adds a diagnostic step before "Build everything" that prints: - which tsc + npx tsc --version - node_modules/typescript/package.json version - TS api version so the next run gives us the actual installed version. Also drops `typeRoots` from tsconfig — the default behaviour (auto- include @types/* from node_modules/@types) is what we want, and the explicit typeRoots may have been masking a different resolution quirk in some TS versions.
1 parent 9825780 commit 6d6eaf6

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,20 @@ jobs:
137137
- name: Install website dependencies
138138
run: npm --prefix website ci
139139

140+
- name: Diagnose TypeScript resolution
141+
run: |
142+
echo "=== which tsc + version ==="
143+
which tsc || true
144+
npx tsc --version
145+
echo "=== node_modules/typescript/package.json version ==="
146+
node -p "require('./node_modules/typescript/package.json').version"
147+
echo "=== ignoreDeprecations valid values ==="
148+
node -e "
149+
const ts = require('typescript');
150+
const v = ts.version;
151+
console.log('TS api reports version:', v);
152+
"
153+
140154
- name: Build everything
141155
run: npm run build:all
142156

‎tsconfig.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
"declarationMap": true,
1515
"sourceMap": true,
1616
"moduleResolution": "node",
17-
"ignoreDeprecations": "5.0",
18-
"typeRoots": ["./node_modules/@types"]
17+
"ignoreDeprecations": "5.0"
1918
},
2019
"include": ["src/**/*"],
2120
"exclude": ["node_modules", "dist", "tests", "dashboard"]

0 commit comments

Comments
 (0)