React-Native搭建环境 TypeError: cli.init is not a function

290 阅读1分钟

React-Native搭建环境 TypeError: cli.init is not a function

QQ截图20221109120229.png

解决方案:

1、删除react-native:npm uninstall -g react-native-cli
2、重新安装:yarn add react-native --exact
3、新建项目:react-native init project