Unable to install Sharkey: front end fatal error

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.7
What app is this about: Sharkey

Describe your issue

I am trying to install Sharkey through Yunohost. The first time failed (1GB RAM insufficient, web interface would hang with no error message, command line console install attempt showed install failure) and after upgrading to 2GB RAM the second install also failed. The second time the web interface did not hang and I did not have to go into the command console to see how the process resolved. I know basically nothing about Linux so I do not know how to read the error log. How do I resolve whatever problem resulted in the error message of “packages/frontend build: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory”?

I attempted following the command line instructions here FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory in Ionic 3 - Stack Overflow but am met with the error message of -bash: node: command not found when i try to confirm the current value. I was able to enter export NODE_OPTIONS="--max-old-space-size=1536" but received no confirmation response.

Tried running the install a third time after this and encountered the same fatal error.

Share relevant logs or error messages

https://paste.yunohost.org/raw/nupowejufo

As you figured, the build process ran out of memory. For one reason or another env is not inherited when running yunohost command, hence your export is not effective.
This requires patching in the repo :confused:

Is there anything I can do in the command line console to help the install succeed?

Do you happen to have swap space enabled on your machine? We can try upping the memory limit, but this needs to go somewhere.

To test with updated memory limit you can install with:

sudo yunohost app install https://github.com/YunoHost-Apps/sharkey_ynh/tree/orhtej2-patch-1

or use https://github.com/YunoHost-Apps/sharkey_ynh/tree/orhtej2-patch-1 as custom URL during app installation.

How do I check or enable swap space on my VPS? I’m still very new to this, sorry.

I typically follow this guide, adding around 4G swap is good for all the use cases (you can add less if you’re short on disk space).

Using that guide worked and I was able to successfully install Sharkey within Yunohost, thank you so much! (Now I have to deal with DNS problems in order to actually connect to the domain on the web but that’s an entirely separate issue I already knew about, haha.)

Would you recommend following step 6 and adjusting swappiness/cache pressure? I stopped after step 5 to try the install.

Also, can I proceed with the app version you had me install or should I do something different now?

I’ll merge the proposed fix to master so no action needed on your part regarding the version.

As for swapiness I have no advice, I’ve used both values at some point and noticed no real difference :man_shrugging:

All right, then I’ll leave those values alone. Thanks again!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.