question

SherryWu-1387 avatar image
0 Votes"
SherryWu-1387 asked SherryWu-1387 commented

Deploying a React App to Azure VM failed at npm installing packages

Hello!

My Azure virtual machine is ubuntu 18.04 with size of Standard B1ls (1 vcpus, 0.5 GiB memory).
I intended to deploy a React website to it but failed at installing packages.
It runs well in local test, doubt that if it's due to the vm memory size?
Please see the error message below and kindly advise how to proceed thank!85638-error.png


azure-virtual-machines
error.png (36.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RahulMetangale-9479 avatar image
0 Votes"
RahulMetangale-9479 answered SherryWu-1387 commented

Hi @SherryWu-1387,

Yes your assumption is correct. if VM is running out of memory then npm install fails with an error Killed. You can either increase the VM size or follow this link to add swap space.

I hope this helps.

Thanks,
Rahul Metangale


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @RahulMetangale-9479 !
Thank you for the suggestions, First I added swap space of 1GB, then increased the VM size to B1S.
Still couldn't install packages with a new error, please see the screenshot below, thanks!86475-error1.png


0 Votes 0 ·
error1.png (147.2 KiB)