Commit a5195d9
committed
fix(onnx): remove ES module type from onnxruntime package.json
The ONNX Runtime build system generates wasm_post_build.js which uses
CommonJS require() syntax. When package.json has "type": "module", Node.js
tries to run this generated file as an ES module, causing:
ReferenceError: require is not defined in ES module scope
Solution: Remove "type": "module" from package.json. The build scripts
(build.mjs, clean.mjs) are already .mjs files so they'll run as ES modules,
while the generated post-build scripts will run as CommonJS.
Fixes ONNX Runtime WASM build failure.1 parent c4f6c12 commit a5195d9
1 file changed
+0
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
0 commit comments