Skip to content

Jest 30.4.2 fails because unrs-resolver's wasm32-wasi binding reports jest-circus/runner.js missing even though it exists #2147

Description

@donthedeveloper

Describe the bug

Jest 30.4.2 fails in a fresh standalone Stackblitz project before executing any tests because it says it can't find the test runner.

ls -l node_modules/jest-circus/build/runner.js confirms the file does exist,
and node -e "console.log(require.resolve('jest-circus/runner'))" resolves it
without issue. Only Jest's own resolution step fails.

Error:

❯ npm test

> test
> jest

[napi-postinstall@0.3.4] Downloading `@unrs/resolver-binding-wasm32-wasi@1.12.2` on WebContainer...
Packages: +7
+++++++
Progress: resolved 7, reused 0, downloaded 7, added 7, done

dependencies:
+ @unrs/resolver-binding-wasm32-wasi 1.12.2

 WARN  Issues with peer dependencies found
.
└─┬ @unrs/resolver-binding-wasm32-wasi 1.12.2
  └─┬ @napi-rs/wasm-runtime 1.2.0
    ├── ✕ unmet peer @emnapi/core@^2.0.0-alpha.3: found 1.10.0 in @unrs/resolver-binding-wasm32-wasi
    └── ✕ unmet peer @emnapi/runtime@^2.0.0-alpha.3: found 1.10.0 in @unrs/resolver-binding-wasm32-wasi

Done in 2.6s
● Validation Error:

  Module /home/projects/stackblitz-starters-w1mewnjm/node_modules/jest-circus/build/runner.js in the testRunner option was not found.
         <rootDir> is: /home/projects/stackblitz-starters-w1mewnjm

  Configuration Documentation:
  https://jestjs.io/docs/configuration


~/projects/stackblitz-starters-w1mewnjm 3s

Link to the blitz that caused the error

https://stackblitz.com/edit/stackblitz-starters-w1mewnjm

Steps to reproduce

  1. Go to the stackblitz container that I linked
  2. Run npm test in the terminal.

Expected behavior

Jest should run with no issues and the test should pass.

Parity with Local

Screenshots

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

Downgrading to Jest 29.7.0 is a temporary workaround.

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