简体   繁体   English

反应原生'无法在项目中找到expo

[英]React native 'unable to find expo in the project

I am working for my study on a React Native project, with group members.我正在与小组成员一起研究 React Native 项目。 My group member who made the project has no problems running the project.我制作该项目的小组成员在运行该项目时没有问题。 I have expo installed globally, but can not run the program:我已全局安装 expo,但无法运行程序:

Unable to find expo in this project - have you run yarn / npm install yet?
        ├─ action C:\Users\thoma\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:34:11
        ├─ C:\Users\thoma\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:135:22
        └─ expo start C:\Users\thoma\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:350:7
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @ start: `expo start`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @ start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm WARN Local package.json exists, but node_modules missing, did you mean to install?
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\thoma\AppData\Roaming\npm-cache\_logs\2021-06-07T11_27_47_082Z-debug.log

What can I do to solve this?我能做些什么来解决这个问题?

At the root of your project, Run command在项目的根目录下,运行命令

yarn

So basically your partner would have added few dependencies and committed his code.所以基本上你的合作伙伴会添加一些依赖项并提交他的代码。 Now after fetching you need to have those dependencies in your project which is why you would have to run above command.现在,在获取之后,您需要在项目中拥有这些依赖项,这就是您必须运行上述命令的原因。

You can also use npm install , depending upon your system configurations.您还可以使用npm install ,具体取决于您的系统配置。

This is because you are not in your project folder.这是因为您不在项目文件夹中。
You need to run this command:您需要运行以下命令:

expo start

inside the project folder.在项目文件夹中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ios 模拟器未在 expo 反应原生项目中启动 - ios simulator not launching in expo react native project 无法使用EXPO建立项目(React Native和Node) - can't build a project with expo (react native and node) 如何在 expo 项目中使用 Twilio 发送消息(React Native) - how to send a message with Twilio in an expo project (React Native) 找不到模块“../xcode”需要堆栈 - React Native - Expo cli - Cannot find module '../xcode' Require stack - React Native - Expo cli 当我运行“ expo init my-app”时,无法使用expo构建项目(React Native和Node) - When I run “expo init my-app” I can't build a project with expo (React Native and Node) React Native Expo Cli Facebook 身份验证 - 无法交换服务器上访问令牌的响应类型代码 API - React Native Expo Cli Facebook Authentication - unable to exchange Response type code for access token on server API 在这个项目中找不到 expo - 你运行 yarn / npm 安装了吗? Npm已经安装,expo目录存在 - Unable to find expo in this project - have you run yarn / npm install yet? Npm has been installed, expo directory exists 无法从 crypto-js(React-Native、AWS、Expo)解析模块加密 - Unable to resolve module crypto from crypto-js (React-Native, AWS, Expo) 为什么我不能使用 expo init 命令创建 React native 项目? - Why can't I create a React native project using the expo init command? 当我运行“npx react-native start”时找不到模块“@expo/metro-config” - Cannot find module '@expo/metro-config' when i run "npx react-native start
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM