Open tempe-techie opened 11 months ago
Btw, I assume most of the library size is due to a local prover.
Could you perhaps create a lightweight library without the local prover capabilities?
I know using a local prover is the most secure, but on mobile it sometimes works very slowly, so I intended to use a delegated prover anyway in my project.
Summary
Hi, I have troubles building a Vue project that has the zkbob-client-js package for either Vite or Vue-CLI environments.
The error that occurs when running
npm run build
is:Any ideas how to solve this issue? Or should I wait for the library to be optimized?
Complete stacktrace
The whole error stacktrace is this:
Steps to reproduce
In the installation wizard select "No" for everything, so that you get the most light-weight starting point.
vite-plugin-node-polyfills
library is just to avoid theprocess is not defined
error because vite does not have support for process (or Buffer). The memory leak error occurs also without thevite-plugin-node-polyfills
library, so it's irrelevant.src/App.vue
:Step 7 is where the heap error occurs. Same error happens using Yarn instead of npm.
Increasing the allocated RAM
I tried increasing RAM allocated to Node using
NODE_OPTIONS=--max-old-space-size=18000
:When I increased it to 18GB, the heap error did not occur anymore, but another memory leak error appeared (
what(): std::bad_alloc
):