How to prevent node from running out of memory when bundling js for React Native

前端 未结 5 2121
误落风尘
误落风尘 2021-01-02 06:01

When bundling js for React Native using ClojureScript I got the following error. It seems that node runs out of memory when bundling the javascript bundle. This is probably

5条回答
  •  佛祖请我去吃肉
    2021-01-02 06:07

    For iOS, with react-native 0.59.0 works by editing on ios/YourProjectName.xcodeproj/project.pbxproj

    this line

    shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
    

    with

    shellScript = "export NODE_OPTIONS=--max_old_space_size=4096\n../node_modules/react-native/scripts/react-native-xcode.sh";
    

提交回复
热议问题