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

前端 未结 7 1137
萌比男神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:09

    I had a similar issue, although on a Mac computer. Setting an environment variable did the trick for me. That way, your node process will take the value and use it independently of which script you're running.

    export NODE_OPTIONS=--max_old_space_size=4096
    

    The run your command again. Good Luck!

提交回复
热议问题