Vite Out of memory
Has anyone run into this before?
~/vanilla$ NODE_OPTIONS=--max-old-space-size=32768 npm run build
build vite buildnode:internal/process/promises:289 triggerUncaughtException(err, true /* fromPromise */); ^ [RangeError: WebAssembly.instantiate(): Out of memory: Cannot allocate Wasm memory for new instance] Node.js v20.5.0
6 Replies
Never seen that. Even on a 10 year old Mac. Sorry.
Maybe drop to node 18.
Never seen that before.
Tried it on 2 shared hosts, Siteground.com and Tigertech.net. Neither of those worked. Moved to Cloudways and it works fine even with their cheapest hosting plan. My research suggests it might be related to ulimit -v limits. I don't know for sure. Maybe this info will help someone else someday.
Laravel really doesn’t play well on shared hosting.
I’ve run into this on a non filament project. In that case, I have a NPM package that I need that is bloated and vite runs out of memory. Don’t know of any filament related packages that include such bloated dependencies. I’m having to build on my local machine and SFTP to the site - it’s kinda sad. Do you have any custom pages or widgets that you’re pulling in NPM packages for?
Just an out of the box laravel and filament v3 install. No additional packages were added.