问题描述
我目前正在尝试使用命令 expo update
将我的 Expo SDK 从 36.0.0 更新到至少 37.0.0但是我得到了错误:
Im currently trying to update my Expo SDK from 36.0.0 to atleast 37.0.0 with the command expo update
however im getting the error:
× Failed to install expo package with error: yarnpkg exited with non-zero code: 1
yarnpkg exited with non-zero code: 1
Error: yarnpkg exited with non-zero code: 1
at ChildProcess.completionListener (C:UsersPhilippAppDataRoaming
pm
ode_modulesexpo-cli
ode_modules@expospawn-asyncsrcspawnAsync.ts:65:13)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.cp.emit (C:UsersPhilippAppDataRoaming
pm
ode_modulesexpo-cli
ode_modulescross-spawnlibenoent.js:34:29)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
...
at Object.spawnAsync [as default] (C:UsersPhilippAppDataRoaming
pm
ode_modulesexpo-cli
ode_modules@expospawn-asyncsrcspawnAsync.ts:26:19)
at YarnPackageManager._runAsync (C:UsersPhilippAppDataRoaming
pm
ode_modulesexpo-cli
ode_modules@expopackage-managersrcNodePackageManagers.ts:288:31)
at YarnPackageManager.addAsync (C:UsersPhilippAppDataRoaming
pm
ode_modulesexpo-cli
ode_modules@expopackage-managersrcNodePackageManagers.ts:241:16)
at upgradeAsync (C:UsersPhilippAppDataRoaming
pm
ode_modulesexpo-clisrccommandsupgrade.ts:465:5)
at C:UsersPhilippAppDataRoaming
pm
ode_modulesexpo-clisrccommandsupgrade.ts:701:7
at Command.<anonymous> (C:UsersPhilippAppDataRoaming
pm
ode_modulesexpo-clisrcexp.ts:302:7)
npm 版本:6.14.8纱线版本:2.2.2 我也尝试过使用较低版本的 1.x.x博览会诊断:
npm version : 6.14.8 yarn version : 2.2.2 i also tried it with a lower version 1.x.x expo diagnostics :
Expo CLI 3.27.4 environment info:
System:
OS: Windows 10 10.0.19041
Binaries:
Node: 12.18.3 - C:Program Files
odejs
ode.EXE
Yarn: 2.2.2 - C:UsersPhilippAppDataRoaming
pmyarn.CMD
npm: 6.14.8 - C:Program Files
odejs
pm.CMD
npmPackages:
expo: ^36.0.0 => 36.0.2
react: 16.9.0 => 16.9.0
react-dom: 16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
react-native-web: ^0.11.7 => 0.11.7
react-navigation: 3.11.1 => 3.11.1
Expo Workflow: managed
希望有人可以帮助我,感谢任何帮助.非常感谢!
Hopefully someone can help me, any help is appreciated. Thank you very much!
推荐答案
从 package.json 中删除这一行
remove this line from package.json
react-native":https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz"
现在删除 node_modules
now remove node_modules
现在:
纱线安装
现在将该行重新添加到 package.json 中
now add that line back in package.json
再次
纱线安装
现在如果成功了,做一个
now if it succeeds, do a
展会升级
2天后我解决了
这篇关于无法安装 expo 包并出现错误:yarnpkg 以非零代码退出:1 yarnpkg 以非零代码退出:1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!