【问题标题】:I am trying to install react-native but keep getting errors我正在尝试安装 react-native 但不断出现错误
【发布时间】:2021-10-08 15:13:12
【问题描述】:
我想开始使用 react-native 开发本机应用程序,并且我也使用 VScode 作为我的代码编辑器,当我尝试使用此命令“expo init First project”启动我的项目时,我一直遇到错误,所以怎么做你认为我可以克服这个错误
【问题讨论】:
标签:
javascript
html
reactjs
django
react-native
【解决方案1】:
在开始项目之前,您应该先使用 npm install --global expo-cli 安装 expo-cli
【解决方案2】:
安装 Node.js 后,运行以下命令:
npm install -g expo-cli
成功安装 Expo CLI 后,您可以通过运行以下命令来初始化一个全新的项目:
expo init <name of project goes here>
cd <name of project goes here>
npm start
以下是其工作原理的示例:
expo init my-todo-app
cd my-todo-app
npm start