0

When I run 'npm run build' in the vsCode terminal ,within a few seconds, it compiles. However, when I run 'npm run build' on the ubuntu 20.04 server after I've pulled my code from gihub, it takes hours and then never actually compiles. The reason is usually a memory leak, but I started increasing the memory allocation, and now the server disconnects before it ever finishes the build.

My app is a mern app, does anyone know if this is an issue with my code or is the issue that I don't need to build my app on the ubuntu server? For example could I build the app it vscode first, as that seems to work?

willmahon
  • 319
  • 4
  • 13

1 Answers1

0

you don't need to build the app in ubuntu server in order to deploy the same. You can build your app anywhere and copy the content of the build folder to the server for deploying.

Vilsad P P
  • 1,529
  • 14
  • 23