这是什么问题? 我尝试了这个: rm -rf node_modules rm package-lock.json npm缓存清理--force npm install
root@onlinetest:~/mini-kyc-app/client# npm run build
> client@0.1.0 build /root/mini-kyc-app/client
> react-scripts build
Creating an optimized production build...
The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-09-03T02_25_55_878Z-debug.log
root@onlinetest:~/mini-kyc-app/client#
答案 0 :(得分:2)
问题显然出在我可用的RAM数量上。解决方案:内存交换
按照此https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-18-04
添加更多交换空间