I am using Angular 5 .NET core template to build our application but our project has become too huge, whenever I publish my project I am getting an error: "JavaScript heap out of memory."
I have tried many solutions.
I have used npm i increase-memory-limit
to increase memory limit.
I have also tried this node --max_old_space_size=8000
.
But I am not getting the correct solution.
Help me for .netcoreangular5 template.
please try this try this i am sure you will get solution.
replace
Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod"
Exec Command="node node_modules/webpack/bin/webpack.js --env.prod"
with
Exec Command="node --max_old_space_size=10240 node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod"
Exec Command="node --max_old_space_size=10240 node_modules/webpack/bin/webpack.js --env.prod"
publish it again, it will work for javascript-heap-out-of-memory-error.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.