Open
Description
After #3174 which brings updated wasm-bindgen we started seeing tests fail.
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //rules_js/test:hello_world_wasm_direct_test
-----------------------------------------------------------------------------
(node:22) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:22) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(node:22) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/44886e0696fee5410020d9bd8d8f80cb/sandbox/linux-sandbox/261/execroot/_main/bazel-out/k8-fastbuild/bin/rules_js/test/hello_world_wasm_direct_test_/hello_world_wasm_direct_test.runfiles/_main/rules_js/test/hello_world_bundler_wasm_bindgen/hello_world_bundler_wasm_bindgen.js:1
import * as wasm from "./hello_world_bundler_wasm_bindgen_bg.wasm";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:76:18)
at wrapSafe (node:internal/modules/cjs/loader:1283:20)
at Module._compile (node:internal/modules/cjs/loader:1328:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:203:29)
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
at async main (file:///var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/44886e0696fee5410020d9bd8d8f80cb/sandbox/linux-sandbox/261/execroot/_main/bazel-out/k8-fastbuild/bin/rules_js/test/hello_world_wasm_direct_test_/hello_world_wasm_direct_test.runfiles/_main/rules_js/test/hello_world_wasm_test.mjs:19:17)
It's currently unclear what the solution is but until we can enable testing again the rules_js
integrations will be disabled in CI. The rules should still be consumable but until fixed accepting new pull-requests is considered high risk.