I am having issue with deploying my MEAN stack application to droplet.

Here is my droplet information -

Ubuntu 18.04.3 (LTS) x64
1 vCPUs
1GB / 25GB Disk

I am following a tutorial to set up the application in droplet -

https://jasonwatmore.com/post/2018/09/26/setup-nodejs-mongodb-production-server-on-ubuntu-1804

My application is working fine in localhost. But when try to build server side rendering with following command npm run start, having following error -

> product-bot@0.0.0 start /opt/product-bot
> npm run build:ssr && npm run serve:ssr


> product-bot@0.0.0 build:ssr /opt/product-bot
> npm run build:client-and-server-bundles && npm run webpack:server


> product-bot@0.0.0 build:client-and-server-bundles /opt/product-bot
> ng build --prod && ng run product-bot:server

 19% building modules 79/128 modules 49 active …modules/@angular/cdk/esm5/layout.es5.jsKilled
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! product-bot@0.0.0 build:client-and-server-bundles: `ng build --prod && ng run product-bot:server`
npm ERR! Exit status 137
npm ERR! 
npm ERR! Failed at the product-bot@0.0.0 build:client-and-server-bundles 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/2019-11-06T11_52_18_839Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! product-bot@0.0.0 build:ssr: `npm run build:client-and-server-bundles && npm run webpack:server`
npm ERR! Exit status 137
npm ERR! 
npm ERR! Failed at the product-bot@0.0.0 build:ssr 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/2019-11-06T11_52_18_902Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! product-bot@0.0.0 start: `npm run build:ssr && npm run serve:ssr`
npm ERR! Exit status 137
npm ERR! 
npm ERR! Failed at the product-bot@0.0.0 start 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/2019-11-06T11_52_18_923Z-debug.log

If it is something related to my code, it couldn’t work in localhost. Or I am missing something in configuration.

Thanks in advance!

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!