当我运行“ expo init my-app”时,无法使用expo构建项目(React Native和Node)

时间:2019-03-24 19:00:39

标签: node.js reactjs react-native npm expo

当我尝试在控制台中运行“ expo init my-new-project”时,我=我在选择“空白”或“选项卡”选项后得到了这些提示。

? Choose a template: expo-template-blank
? Please enter a few initial configuration values.
Read more: https://docs.expo.io/versions/latest/workflow/configuration/ » 50% completed
{
"expo": {
"name": "<The name of your app visible on the home screen>",
"slug": "my-app"
}
}

我尽了一切,但这种情况仍在发生。我该如何正确安装它?如果看到这种按摩,下一步该怎么做?

2 个答案:

答案 0 :(得分:1)

这是我的工作方式? 首先,您需要将npm install -g expo-cli安装到根目录中。然后,您将看到此enter image description here图片。只需按 Enter 即可更改“名称” “ displayName” 。看图片!更改名称,然后按向下箭头按钮,然后更改“ displayName” ,然后按 Enter 。然后查看此enter image description here,输入 Y ,然后输入 Enter 。然后您就可以开始了...然后查看此图像enter image description here。 现在简单的部分为cd yourprojectname,然后为npm start。 享受使用博览会 有关更多信息-Getting started expo cliConfig Json(现在不需要)

答案 1 :(得分:0)

收到这样的短语时,请在键盘上键入一个字符,然后将其输入到name()中。如果安装了Yarn,请询问是否要使用yarn进行安装,并写下Yes以完成安装。单词将如下图所示。

enter image description here

enter image description here