尝试创建新的React Native项目时出错

时间:2019-12-20 20:05:13

标签: javascript reactjs react-native npm

当我尝试创建新的React Native项目时,出现此错误

error Error: Cannot find module 'C:\Users\AT140519\AppData\Local\Temp\rncli-init-template-2wFpDD\node_modules\react-native\template.config'
Require stack:
- c:\Users\AT140519\node_modules\@react-native-community\cli\build\commands\init\template.js
- c:\Users\AT140519\node_modules\@react-native-community\cli\build\commands\init\init.js
- c:\Users\AT140519\node_modules\@react-native-community\cli\build\commands\init\index.js
- c:\Users\AT140519\node_modules\@react-native-community\cli\build\commands\index.js
- c:\Users\AT140519\node_modules\@react-native-community\cli\build\index.js
- c:\Users\AT140519\node_modules\react-native\cli.js

怎么了?

1 个答案:

答案 0 :(得分:0)

它正在寻找react-native软件包,但似乎未安装。

尝试运行npm i react-native