Closed Relaxe111 closed 4 years ago
I found out that issue is not related to typescript self. But rather to create-react-apps "fork-ts-checker-webpack-plugin" in combination with mobx state tree. Solution?: I refactored code and removed those two methods which were a problem.
For future reference: @Relaxe111, do I understand it right that the code:
self.questions.filter(q => q.properties.question_uuid !== question_uuid)
simply got executed on a too large dataset which caused the memory to fill up?
Cause in your case removing the functions solved it. But just removing functionality from an application is not always an option.
Would you be so kind to share a bit more?
Hello @stefanKuijers! I'm not sure. I refactored code that time and removed filter outside of mobx state tree node. But i suspect that there is some collision between mst and ForkTsCheckerWebpackPlugin. Now I have same issue but have no idea where it happens again. It happens when i convert js mst model files from js to ts extension.
I think only solultion for me is to disable ForkTsCheckerWebpackPlugin and use tsc instead.
I have searched on https://github.com/Microsoft/TypeScript/search?type=Issues. I did not a similar issue with the same cause. I read the FAQ on https://github.com/Microsoft/TypeScript/wiki/FAQ. I did not find a similar issue.
TypeScript Version: "3.7.5"
Search Terms: React typescript Ineffective mark-compacts near heap allocation failed. node_modules\typescript\lib\typescript.js Code Issue happens. when I converted the following file from .js to .ts: I discovered that with findQuestion() code compiles in more than 1000 s. but if I add FilterQuestions() I get Ineffective mark-compacts near heap allocation failed!
When I build to production or start the development server. after running ~30 min. I get the following issue: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory -\node_modules\typescript\lib\typescript.js
Expected behavior: Expect the project to build
Actual behavior: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory -\node_modules\typescript\lib\typescript.js
this is the cli output:
this is report issued report.20200201.190457.6860.0.001.json: