Search code examples
vue.jsnpmcpanel

Cannot build on cPanel/SSH | Laravel + Vue


I have a cPanel server. I have ssh access to the server. Once I have pulled the new changes/files via Git, I ran npm run build. It gave me the following error.

error screenshot

How do I fix this error?

I checked the file/directory permissions and they were 644/755 respectively.

I searched online and could not found a solution.

I tried the following option, it still errors.

enter image description here

It seems there are no limits to the user too. See the below screenshot.

enter image description here


Solution

  • There is an option in cPanel/WHM called 'Shell Fork Bomb Protection'

    I found this article about 'Shell Fork Bomb Protection': https://docs.cpanel.net/whm/security-center/shell-fork-bomb-protection/

    You have disable that option in order to npm run build

    enter image description here

    Also to verify, when you run ulimit -a, you should get a higher value for max user processes. (compare before and after disabling 'Fork Bomb')

    Reference

    https://forums.cpanel.net/threads/cannot-build-on-cpanel-ssh-laravel-vue.711657/