I am using metronics theme for developing admin panel in angular and i am publishing in linux (ubuntu 20) server. While running ng build command it gets stuck in building phase ( Generating browser application bundles (phase: building)).
Is there any specific requirements for metronics theme to build on production server? Because ng serve command works well, both in local environment and production environment as well.
Appreciate your help in this!
There could be several possible reasons why your build process is getting stuck in the production server. Here are some suggestions that might help you:
- Check your memory usage and available disk space on your server. Sometimes, ng build can consume a lot of memory and disk space. You can use commands like
free -m and
df -h to monitor your memory and disk usage. If you are running out of memory or disk space, you might need to increase them or delete some unnecessary files.
- Try using the
--no-aot flag when running ng build. This flag disables the ahead-of-time compilation, which can speed up the build process but also requires more memory and CPU power.
- Try updating your Angular CLI and other dependencies to the latest versions. Sometimes, ng build can get stuck due to some bugs or compatibility issues with older versions of Angular CLI or other packages. You can use commands like
ng update and
npm update to update your Angular CLI and other dependencies.
I hope these suggestions can help you resolve your issue.