This package uses^1 a versioned WASM binary file of ONNX runtime Web fetched from CDN^2.
Due to the WASM file is for onnxruntime-web@1.18.0 and onnxruntime-web@1.19.0 seems not to be compatible with that WASM file, using this library with onnxruntime-web@1.19.0 (and probably later versions) throws an exception at predict().
# Firefox (no stack trace...)
RuntimeError: indirect call to null [ort-wasm-simd-threaded.wasm:7257016:1](https://cdnjs.cloudflare.com/ajax/libs/onnxruntime-web/1.18.0/ort-wasm-simd-threaded.wasm)
# Chrome
ort-wasm-simd-threaded.wasm:0x6ebbb8
Uncaught (in promise) RuntimeError: null function or function signature mismatch
at ort-wasm-simd-threaded.wasm:0x6ebbb8
at Jr (onnxruntime-web.js?v=a0152505:13175:39)
at Xa (onnxruntime-web.js?v=a0152505:13585:129)
at c (onnxruntime-web.js?v=a0152505:13588:13)
at we (onnxruntime-web.js?v=a0152505:13069:20)
at onnxruntime-web.js?v=a0152505:13555:17
Adding an escape-hatch like #7 would solve this problem.
Or, narrowing peerDependencies.onnxruntime-web to 1.18.x would reduce the chance of users installing >= 1.19.0.
As a workaround, users can avoid the error by pinning onnxruntime-web to 1.18.0 in project's package.json.
This package uses^1 a versioned WASM binary file of ONNX runtime Web fetched from CDN^2. Due to the WASM file is for
onnxruntime-web@1.18.0
andonnxruntime-web@1.19.0
seems not to be compatible with that WASM file, using this library withonnxruntime-web@1.19.0
(and probably later versions) throws an exception atpredict()
.Adding an escape-hatch like #7 would solve this problem. Or, narrowing
peerDependencies.onnxruntime-web
to1.18.x
would reduce the chance of users installing>= 1.19.0
. As a workaround, users can avoid the error by pinningonnxruntime-web
to1.18.0
in project'spackage.json
.Steps to reproduce
package-lock.json
npm i
)npm run dev