创建react-native cli项目时出错

Kan*_*til 4 react-native

错误:

错误:在“react-native”模板中找不到“C:\Users\Admin\AppData\Local\Temp\rncli-init-template-oScLDz\node_modules\react-native\template.config.js 文件。请确保模板有效。了解更多: https: //github.com/react-native-community/cli/blob/master/docs/init.md#creating-custom-template

截屏:

在此输入图像描述

Aks*_*ani 7

我尝试过使用 npm 并且它有效。

npx react-native init YourAwesomeProject --npm
Run Code Online (Sandbox Code Playgroud)

之后我完全卸载了yarn。因为你可以使用 npm 安装库。所以我用去除了纱线

npm uninstall -g yarn
Run Code Online (Sandbox Code Playgroud)


归档时间:

查看次数:

2484 次

最近记录:

3 年,8 月 前