. Advertisement .
..3..
. Advertisement .
..4..
Hi everyone, I’m learning about javascript. While working, I try use npm run build -prod command to build the frontend. As a result, I get the message:
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] build: `ng build --prod --build-optimizer --aot`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the [email protected] build 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! C:\Users\Indrajith.E\AppData\Roaming\npm-cache\_logs\2019-08-22T08_41_00_271Z-debug.log
What can I do about the “This is probably not a problem with npm. There is likely additional logging output above.” issue? Is there a better approach?
The cause: The most common cause of this problem is that the javascript heap has run out of memory. This is not a problem with npm, as the error states.
The solution: All we have to do now is
instead of,
By following the steps below, you can increase the memory available to javascript.
Your
package-lock.json
andnode_modules
files should be deleted. Next, run npm cache cleanerdo
npm install
Run again