如何在复制模板时解决React本机错误

问题描述 投票:0回答:1

我正在尝试使用react native cli创建react native应用程序,但下载模板后显示错误

错误:找不到模块'C:\ Users \ Thakur \ AppData \ Local \ Temp \ rncli-init-template-d9w32Z \ node_modules \ react-native \ template.config'

我正在使用以下命令来创建应用;

npx react-native init MyApp

有人请让我知道我做错了。任何帮助都将不胜感激。

谢谢

react-native
1个回答
0
投票

重新安装react native cli

npm i -g react-native-cli

yarn global add react-native-cli

然后

react-native run-android

react-native run-ios
© www.soinside.com 2019 - 2024. All rights reserved.