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: code example

Example 1: This is probably not a problem with npm. There is likely additional logging output above lite server

npm cache clean --force

Example 2: This is probably not a problem with npm. There is likely additional logging output above.

npm  run build -prod

Example 3: This is probably not a problem with npm. There is likely additional logging output above.

node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng build --prod