New react-native app has 'TypeError: babelHelpers.typeof is not a function' [iOS]

后端 未结 7 1895
花落未央
花落未央 2020-12-31 02:37

A new project created with the latest version of react-native throws javascript error while running(/debugging). Tested this on simulator.

[fatal][tid:main]         


        
7条回答
  •  执笔经年
    2020-12-31 03:06

    One issue is that if there is a .babelrc in a parent directory to your app, the packager will read that and it will cause this exact error. One way around it is to add a .babelrc file in your project:

    {
      "presets": ["react-native"]
    }
    

提交回复
热议问题