相关疑难解决方法(0)

语法'nullishCoalescingOperator'当前未启用

当我试图在ios-simulator上构建我的应用程序时,它说:

捆绑失败:SyntaxError:/Users/MyName/MyApp/node_modules/react-native/node_modules/react-native/Libraries/Components/Switch/Switch.js:nullishCoalescingOperator目前尚未启用对实验语法的支持(167:52):

 165 |         {...props}
  166 |         {...platformProps}
> 167 |         accessibilityRole={props.accessibilityRole ?? 'button'}
      |                                                    ^
  168 |         onChange={this._handleChange}
  169 |         onResponderTerminationRequest={returnsFalse}
  170 |         onStartShouldSetResponder={returnsTrue}
Run Code Online (Sandbox Code Playgroud)

Add @babel/plugin-proposal-nullish-coalescing-operator (https://git.io/vb4Se) to the 'plugins' section of your Babel config to enable transformation.

我做了它说的,但它没有帮助...任何帮助将不胜感激.

syntax-error ios react-native react-native-ios

16
推荐指数
1
解决办法
6144
查看次数