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?