npm build gives “Ineffective mark-compacts near heap limit Allocation failed”

前端 未结 7 1149
萌比男神i
萌比男神i 2021-02-05 08:44

I have a reactjs/typescript project, running on windows 10. Im trying to build by ts-scripts with

\"rimraf ../wwwroot/* && react-scripts-ts build

7条回答
  •  心在旅途
    2021-02-05 09:05

    I had the same issue on Windows. The solution was to set the NODE_OPTIONS variable before running npm run build. To set this variable, simply run set NODE_OPTIONS=--max_old_space_size=8192

提交回复
热议问题