Skip to content

Fix Windows CI with Node 26.14 - #9494

Merged
cknitt merged 1 commit into
masterfrom
mocha-without-npx
Dec 1, 2026
Merged

cknitt merged 1 commit into
masterfrom
mocha-without-npx

Conversation

@cknitt

@cknitt cknitt commented Dec 1, 2026

Copy link
Copy Markdown
Member

Since Node 26.14.0 became available today, the Windows CI job fails before any test runs:

Error: Cannot find module 'D:\a\rescript\mocha\bin\mocha.js'
Error: Command npx exited with non-zero status: 1

npx mocha looks for Mocha one directory above the checkout (D:\a\rescript\rescript). It hit #9491, #9492 and #9493, three unrelated changes. Master's last run passed on the same runner image with Node 26.13.1. .nvmrc says 26, so CI now picks up 26.14.0, and the Node version is the only thing that changed between the runs.

The fix. mocha() in lib_dev/process.js resolves mocha/bin/mocha.js from node_modules and runs it with node, as the node() helper does for other scripts. That takes npx and its Windows shim out of the path.

I could not try this on Windows locally, so this PR's Windows job is the check.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kbf3gH9cXWp3xtBmfRV3Du

@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Changelog

🏠 Internal

  • Run Mocha in the test scripts without npx, which failed on Windows with Node 26.14.0.

Semantic Diff

1 commit · Full page

✨ Fix Windows CI with Node 26.14

caf1d1a · cknitt + Claude · Dec 01, 2026, 17:40 UTC · new

Why

Since Node 26.14.0, the Windows CI job fails before any test runs: npx mocha looks for D:\a\rescript\mocha\bin\mocha.js, one directory above the checkout. Node 26.13.1 worked, and nothing else changed.

The test scripts now resolve Mocha's CLI script from node_modules and run it with node, like other scripts.

Why:
    Since Node 26.14.0, the Windows CI job fails before any test runs:
    `npx mocha` looks for D:\a\rescript\mocha\bin\mocha.js, one directory
    above the checkout. Node 26.13.1 worked, and nothing else changed.

The test scripts now resolve Mocha's CLI script from node_modules and run
it with node, like other scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gH9cXWp3xtBmfRV3Du
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt
cknitt force-pushed the mocha-without-npx branch from ee32f7d to caf1d1a Compare December 1, 2026 17:43
@cknitt cknitt changed the title Run Mocha without npx in the test scripts Fix Windows CI with Node 26.14 Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

✅ Compiler benchmarks

Allocated words

In total: 655,171,840 → 655,173,078 (±0.00%).

Generated projects: 627,298,938 → 627,298,783 (±0.00%).

None of the 265 benchmarks changed by 0.1% or more.

Instructions

In total: 9,128,430,172 → 9,128,430,172 (±0.00%).

None of the 33 benchmarks changed by 0.1% or more.

Output size

In total: 27,368,788 → 27,368,788 (±0.00%).

None of the 13 benchmarks changed by 0.1% or more.

Pull request caf1d1a compared with base 4717690 in this run.

@pkg-pr-new

pkg-pr-new Bot commented Dec 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@9494

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@9494

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@9494

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@9494

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@9494

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@9494

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@9494

commit: caf1d1a

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

@cknitt
cknitt marked this pull request as ready for review December 1, 2026 18:17
@cknitt
cknitt requested a review from fhammerschmidt December 1, 2026 18:17
@cknitt
cknitt merged commit 69e11bf into master Dec 1, 2026
23 checks passed
@cknitt
cknitt deleted the mocha-without-npx branch December 1, 2026 18:26
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