You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to build my sveltekit project using SSR, and including @hyperledger/aries-askar-nodejs, which uses FFI the project errors with a segmentation fault. It is not clear what is going wrong, or why it is erroring.
When I remove the import of this library the segmentation fault disappears. I've tried excluding the library from being packages in all ways possible (with optimizeDeps, external, etc..), but nothing seems to work.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Upon further debugging I found it will throw the segmentation fault when node-gyp-build is loaded during build. So it seems to actually execute the code during build and try to load the native binary.
So I think the main issue is, why the ssr.external is not being picked up, and ignoring the import of @hypereldger/aries-askar-nodejs during build. Ideally it just keeps the reference to that package, and it needs to be installed in node_modules when you want to run the server.
Describe the bug
When I try to build my sveltekit project using SSR, and including
@hyperledger/aries-askar-nodejs
, which uses FFI the project errors with a segmentation fault. It is not clear what is going wrong, or why it is erroring.When I remove the import of this library the segmentation fault disappears. I've tried excluding the library from being packages in all ways possible (with optimizeDeps, external, etc..), but nothing seems to work.
Reproduction
https://github.com/TimoGlastra/sveltekit-askar-bug
Steps to reproduce
run
pnpm install
and thenpnpm build
System Info
Used Package Manager
pnpm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: