When installing packages from the command line using the npm command and encounter the error:
pthread_create: Resource temporarily unavailable
You should make sure Shell Fork Bomb Protection is disabled in WHM -> Shell Fork Bomb Protection.
More information:
https://docs.cpanel.net/whm/security-center/shell-fork-bomb-protection/