解决方法: 我的工程项目为:RNTest mac打开终端,输入一下命令 1.cd RNTest 2.rm -r node_modules 3.npm install 4.react-native upgrade 再回到项目,没有报错了 相关文章: