Skip to content

Commit eb389d4

Browse files
sunnylqmclaude
andcommitted
ci: set up Node 18 after the build, not before it
typescript >= 7 ships an extensionless ESM bin/tsc that Node 18.17 cannot load (ERR_UNKNOWN_FILE_EXTENSION), so having Node 18 on PATH during the build step broke tsc. Node 18 is only needed for the post-build runtime verification; move its setup there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 863825e commit eb389d4

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ jobs:
1818

1919
- uses: oven-sh/setup-bun@v2
2020

21-
- name: Set up Node.js 18 for runtime verification
22-
uses: actions/setup-node@v6
23-
with:
24-
node-version: '18.17.0'
25-
2621
- run: bun install --frozen-lockfile
2722

2823
- name: Prepare publish version
@@ -31,6 +26,14 @@ jobs:
3126
- name: Build package
3227
run: bun run build
3328

29+
# Node 18 must only be on PATH for the verification below, not during
30+
# the build: typescript >= 7 ships an extensionless ESM bin/tsc that
31+
# Node 18.17 cannot load (ERR_UNKNOWN_FILE_EXTENSION).
32+
- name: Set up Node.js 18 for runtime verification
33+
uses: actions/setup-node@v6
34+
with:
35+
node-version: '18.17.0'
36+
3437
- name: Verify built CLI with Node.js 18
3538
run: |
3639
node --version

0 commit comments

Comments
 (0)