I have a reactjs/typescript project, running on windows 10. Im trying to build by ts-scripts with
\"rimraf ../wwwroot/* && react-scripts-ts build
I have been facing this problem for some time. The problem is most likely caused by a dependancy or component which is a large .js file. I am currently using this package to successfully fix the issue.
You basically install it globally:
npm install -g increase-memory-limit
And then from within your project root you run:
increase-memory-limit
Which will append --max-old-space-size=4096
in all node calls inside your node_modules/.bin/*
files.