React native '无法在项目中找到 expo
React native 'unable to find expo in the project
我正在与小组成员一起研究 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\_logs21-06-07T11_27_47_082Z-debug.log
我该怎么做才能解决这个问题?
在项目的根目录下,运行 命令
yarn
所以基本上你的合作伙伴会添加一些依赖项并提交他的代码。现在在获取之后你需要在你的项目中有这些依赖项,这就是为什么你必须 运行 以上命令。
您也可以使用 npm install
,具体取决于您的系统配置。
这是因为您不在您的项目文件夹中。
您需要 运行 这个命令:
expo start
在项目文件夹中。
我正在与小组成员一起研究 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\_logs21-06-07T11_27_47_082Z-debug.log
我该怎么做才能解决这个问题?
在项目的根目录下,运行 命令
yarn
所以基本上你的合作伙伴会添加一些依赖项并提交他的代码。现在在获取之后你需要在你的项目中有这些依赖项,这就是为什么你必须 运行 以上命令。
您也可以使用 npm install
,具体取决于您的系统配置。
这是因为您不在您的项目文件夹中。
您需要 运行 这个命令:
expo start
在项目文件夹中。