I can not run react-script build on it
npm run buildBecause of the issue: https://github.com/kitze/custom-react-scripts/blob/master/packages/react-scripts/template/README.md#npm-run-build-exits-too-early
So create a Linux swap is life saver.
Firstly, check if swap available :
sudo swapon --showif it show nothing, then you don't have any swap yet.
Now, create a swap file, it should be 2x or 4x of your RAM capacity
sudo fallocate -l 1G /swapfile
To verify the swap is created
ls -lh /swapfileTo enable swap, you may need to change the permission
sudo chmod 600 /swapfilemake swap file
sudo mkswap /swapfilethen
sudo swapon /swapfilecheck if it is ready
sudo swapon --showTo enable swap permanent
Backup file
sudo cp /etc/fstab /etc/fstab.bakAdd the line at the end of file
/swapfile swap swap defaults 0 0
No comments:
Post a Comment