GeezerVison is showing github.com — WASM Emscripten 3.x fails with: Cannot find module 'ws' · Issue #146325 · python/cpython
WASM Emscripten 3.x fails with: Cannot find module 'ws' #146325
Description
First failing build: https://buildbot.python.org/#/builders/1810/builds/2097
0:06:44 load avg: 0.10 [255/501] test_import
0:06:46 load avg: 0.10 [255/501] test_import passed
0:06:46 load avg: 0.10 [256/501] test_importlib
node:internal/modules/cjs/loader:1456
const err = new Error(message);
^
Error: Cannot find module 'ws'
Require stack:
- /home/emscripten/buildarea/3.x.rkm-emscripten.emscripten/build/cross-build/wasm32-emscripten/build/python/python.mjs
at Module._resolveFilename (node:internal/modules/cjs/loader:1456:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1066:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1071:22)
at Module._load (node:internal/modules/cjs/loader:1242:25)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at Module.require (node:internal/modules/cjs/loader:1556:12)
at require (node:internal/modules/helpers:152:16)
at Object.listen (file:///home/emscripten/buildarea/3.x.rkm-emscripten.emscripten/build/cross-build/wasm32-emscripten/build/python/python.mjs:1:99158)
at ___syscall_listen (file:///home/emscripten/buildarea/3.x.rkm-emscripten.emscripten/build/cross-build/wasm32-emscripten/build/python/python.mjs:1:116282)
at wasm://wasm/02b65c12:wasm-function[16939]:0x730c5a {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/emscripten/buildarea/3.x.rkm-emscripten.emscripten/build/cross-build/wasm32-emscripten/build/python/python.mjs'
]
}
Node.js v24.14.0
program finished with exit code 1
cc @hoodmane
Linked PRs
Activity
vstinner commented on Mar 23, 2026
Sadly, "WASM Emscripten 3.x" buildbot doesn't run python -m test.pythoninfo to dump build information. It would be useful to check if something changed between successful build 2096 and failing build 2097.
vstinner commented on Mar 23, 2026
hoodmane commented on Mar 23, 2026
I'll see if I can reproduce locally. It was introduced #146231 which was a change to importlib and it fails in test_importlib. So hopefully it won't be that mysterious.
hoodmane commented on Mar 23, 2026
The added test test_fastpath_cache_cleared_in_forked_child forks but runs on Emscripten.
added a commit that references this issue
on Mar 23, 2026gh-146325: Use `test.support.requires_fork` in test_fastpath_cache_cl…
vstinner commented on Mar 23, 2026
Fixed by #146330. Thanks for the quick fix!
Metadata
Metadata
Development
No branches or pull requestsIssue actions