Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/368.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用@babel/plugin建议nullish合并运算符;巴别塔预设博览会“;_Javascript_React Native_Babeljs_Expo_Create React Native App - Fatal编程技术网

Javascript 使用@babel/plugin建议nullish合并运算符;巴别塔预设博览会“;

Javascript 使用@babel/plugin建议nullish合并运算符;巴别塔预设博览会“;,javascript,react-native,babeljs,expo,create-react-native-app,Javascript,React Native,Babeljs,Expo,Create React Native App,该项目是使用create react native app创建的 当我使用像const a=2??3,将出现一个错误,抱怨无法读取未定义的属性“loose” 我尝试添加插件,但出现了一个构建错误 B.法律改革委员会 这可能是您的babel版本存在的问题: 确保安装了所有正确的babel 7依赖项, e、 g: @巴别塔/核心而非巴别塔核心 @babel/cli而不是babel cli @巴别塔/预设环境,而不是巴别塔预设环境 { "presets": ["babel-preset-expo

该项目是使用create react native app创建的

当我使用像
const a=2??3
,将出现一个错误,抱怨无法读取未定义的属性“loose”

我尝试添加插件,但出现了一个构建错误

B.法律改革委员会
这可能是您的babel版本存在的问题:

确保安装了所有正确的babel 7依赖项, e、 g:

@巴别塔/核心而非巴别塔核心

@babel/cli而不是babel cli

@巴别塔/预设环境,而不是巴别塔预设环境

{
  "presets": ["babel-preset-expo"],
  "env": {
    "development": {
      "plugins": ["transform-react-jsx-source"]
    }
  },
  "plugins": ["@babel/plugin-proposal-nullish-coalescing-operator"]
}