收藏
回答

wasm加载失败: not absolut path?

微信开发者工具:2.01.2510290 Win32-x64

调试工具库:3.12.1

wasmPath="/pkg-face-api/wasm/tfjs-4-22.0/";
await faceapi.tf.setWasmPaths(wasmPath);
//wasmBinaryFile="/pkg-face-api/wasm/tfjs-4-22.0/tfjs-backend-wasm-simd.wasm"
WXWebAssembly.instantiate(wasmBinaryFile, info)

在IDE中运行时,报错:failed to asynchronously prepare wasm: Error: /pkg-face-api/wasm/tfjs-4-22.0/tfjs-backend-wasm-simd.wasm not absolute path

调试工具库:3.15.2,也是报这个错。

但是如果把文件夹改名称中的“点句号”去掉,即改为"/pkg-face-api/wasm/tfjs-4-22-0/",则ok。

在真机运行都是ok的。

感觉是IDE的错误,WXWebAssembly.instantiate路径中不能有“.”字符???

回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 本次回答由AI生成
    05-27
    有用
    回复 1
    • 🐂火星牛
      🐂火星牛
      05-28
      你不够智能,帖中已包含你要的信息。
      05-28
      回复
登录 后发表内容