Javascript 运行React本机应用程序时出错-未知选项

Javascript 运行React本机应用程序时出错-未知选项,javascript,reactjs,react-native,expo,Javascript,Reactjs,React Native,Expo,因此,我一直在尝试学习react native for app development,并在尝试运行一个非常简单的应用程序时遇到了许多错误。我不得不删除node_模块并重新安装。在解决了之前遇到的巨大错误后,现在当我尝试运行它时,我的cmd中出现以下错误: error: unknown option `--assetPlugins' Metro Bundler process exited with code 1 Set EXPO_DEBUG=true in your env to view

因此,我一直在尝试学习react native for app development,并在尝试运行一个非常简单的应用程序时遇到了许多错误。我不得不删除node_模块并重新安装。在解决了之前遇到的巨大错误后,现在当我尝试运行它时,我的cmd中出现以下错误:

error: unknown option `--assetPlugins'

Metro Bundler process exited with code 1
Set EXPO_DEBUG=true in your env to view the stack trace.
error Command failed with exit code 1.
今年早些时候,我在这里发现了一个类似的问题,但解决这个问题的方法似乎是正确地更新expo版本,但我的expo是在几天前开始学习教程时安装的。另外,my app.js文件中的唯一代码如下:

import React, {useState} from 'react';
import { StyleSheet, Text, View, Button } from 'react-native';

export default function App() {
  const[outputText, setOutputText] = useState('New State');
  return (
    <View style={styles.container}>
<Text>{outputText}</Text>
      <Button title="Change Text" onPress={() => setOutputText('the text changed')}/>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});
import React,{useState}来自“React”;
从“react native”导入{样式表、文本、视图、按钮};
导出默认函数App(){
const[outputText,setOutputText]=useState(“新状态”);
返回(
{outputText}
setOutputText(“文本已更改”)}/>
);
}
const styles=StyleSheet.create({
容器:{
弹性:1,
背景颜色:“#fff”,
对齐项目:“居中”,
为内容辩护:“中心”,
},
});

所以我不知道如何调试这个,我是全新的反应。提前谢谢你的帮助。我对react感到非常失望,我已经尝试了一个多星期来完成一个简单的教程,但我在每一步都会遇到错误…

尝试删除package-lock.json asweldidnt help不幸…尝试删除package-lock.json asweldidnt help不幸。。。