gpt4 book ai didi

node.js - React native '无法在项目中找到 expo

转载 作者:行者123 更新时间:2023-12-01 23:22:22 24 4
gpt4 key购买 nike

我正在与小组成员一起研究 React Native 项目。制作该项目的我的小组成员在运行该项目时没有任何问题。我在全局范围内安装了 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

我该怎么做才能解决这个问题?

最佳答案

在项目的根目录下,运行命令

yarn

所以基本上你的合作伙伴会添加一些依赖项并提交他的代码。现在在获取之后你需要在你的项目中有这些依赖项,这就是为什么你必须运行上面的命令。

您还可以使用 npm install,具体取决于您的系统配置。

关于node.js - React native '无法在项目中找到 expo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67871144/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com