FhenixProtocol / fhenix.js

The JavaScript SDK for Fhenix
https://fhenixjs.fhenix.zone/
Other
2 stars 1 forks source link

tfhe_bg.wasm not found when packaging fhenix.js from esm #24

Closed Cashmaney closed 4 months ago

Cashmaney commented 6 months ago

When trying to use fhenix.js in a aws lambda function it errors with

2024-03-20T21:17:56.951Z    undefined   ERROR   Uncaught Exception  {"errorType":"Error","errorMessage":"ENOENT: no such file or directory, open '/var/task/tfhe_bg.wasm'","code":"ENOENT","errno":-2,"syscall":"open","path":"/var/task/tfhe_bg.wasm","stack":["Error: ENOENT: no such file or directory, open '/var/task/tfhe_bg.wasm'","    at Object.openSync (node:fs:581:18)","    at Object.readFileSync (node:fs:457:35)","    at /var/task/index.js:10:77934","    at /var/task/index.js:1:210","    at 8641 (/var/task/index.js:16:12553)","    at r (/var/task/index.js:25:1397)","    at 9920 (/var/task/index.js:10:140488)","    at r (/var/task/index.js:25:1397)","    at 3731 (/var/task/index.js:10:137807)","    at r (/var/task/index.js:25:1397)"]}

This probably has to do with the bundler not knowing what's up, but we should investigate and see if there's:

A. Anything to make this easier from fhenix.js B. Some instructions we can provide to help others with this error

Cashmaney commented 4 months ago

Should be resolved by the same issue that solves #29 (track there)