The official taro document build setting
NODE_OPTIONS=--max-old-space-size=5120 in packages.json, but I would link to deploy a TARO documents to my 4 GB memory server, so here is how to.
Change NODE_OPTIONS settings
NODE_OPTIONS=--max-old-space-size=2500 is reasonable in a 4GB memory server, but that’s far from enough.
Enable the swap
Stop more services while building
It can be restart after reboot.
Install lib vips
2.0.0-beta.1 require vips library, so need install vips at CentOS 7