Expo upgrade error

Please run expo diagnostics and paste the log that’s printed out along with your question or issue!
I’m trying to upgrade expo app from sdk35 to sdk38 using expo upgrade command:
I got this error:

:heavy_multiplication_x: Failed to install expo package with error: npm exited with non-zero code: 1
npm exited with non-zero code: 1
Error: npm exited with non-zero code: 1
at ChildProcess.completionListener (C:\workspace\onboarding-app-mobile\node_modules@expo\spawn-async\src\spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:417:26)
at ChildProcess.emit (events.js:310:20)
at ChildProcess.cp.emit (C:\workspace\onboarding-app-mobile\node_modules\cross-spawn\lib\enoent.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:\workspace\onboarding-app-mobile\node_modules@expo\spawn-async\src\spawnAsync.ts:26:19)
at NpmPackageManager._runAsync (C:\workspace\onboarding-app-mobile\node_modules@expo\package-manager\src\NodePackageManagers.ts:157:31)
at NpmPackageManager.addAsync (C:\workspace\onboarding-app-mobile\node_modules@expo\package-manager\src\NodePackageManagers.ts:100:18)
at upgradeAsync (C:\workspace\onboarding-app-mobile\node_modules\expo-cli\src\commands\upgrade.ts:465:5)
at C:\workspace\onboarding-app-mobile\node_modules\expo-cli\src\commands\upgrade.ts:698:7
at Command. (C:\workspace\onboarding-app-mobile\node_modules\expo-cli\src\exp.ts:80:7)
error Command failed with exit code 1.

expo diagnostics
Expo CLI 3.21.13 environment info:
System:
OS: Windows 10 10.0.18362
Binaries:
Node: 12.16.3 - C:\Users\i_gad\AppData\Local\Temp\yarn–1594114788595-0.5352728224741976\node.CMD
Yarn: 1.22.4 - C:\Users\i_gad\AppData\Local\Temp\yarn–1594114788595-0.5352728224741976\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6514223
npmPackages:
expo: ^37.0.0 => 37.0.12
react: 16.8.3 => 16.8.3
react-dom: 16.8.3 => 16.8.3
react-native: 0.59.10 => 0.59.10
react-native-web: ^0.11.7 => 0.11.7
react-navigation: ^3.11.0 => 3.13.0

Done in 1.08s.

Having the same issue when trying to upgrade expo app from sdk36 to sdk37 using expo upgrade command:

I got this 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 (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)
    at Object.onceWrapper (events.js:422:26)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
    ...
    at Object.spawnAsync [as default] (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
    at YarnPackageManager._runAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/package-manager/src/NodePackageManagers.ts:288:31)
    at YarnPackageManager.addAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/package-manager/src/NodePackageManagers.ts:241:16)
    at upgradeAsync (/usr/local/lib/node_modules/expo-cli/src/commands/upgrade.ts:465:5)
    at /usr/local/lib/node_modules/expo-cli/src/commands/upgrade.ts:698:7
    at Command.<anonymous> (/usr/local/lib/node_modules/expo-cli/src/exp.ts:80:7)

expo diagnostics
Expo CLI 3.22.1 environment info:
System:
OS: macOS 10.15.5
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.2 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6392135
Xcode: 11.5/11E608c - /usr/bin/xcodebuild
npmPackages:
expo: 36.0.2 => 36.0.2
react: 16.8.3 => 16.8.3
react-dom: 16.8.6 => 16.8.6
react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4
react-navigation: 4.0.10 => 4.0.10
npmGlobalPackages:
expo-cli: 3.22.1

try running yarn or npm install (depending on what you use) in your project directory. as the error message indicates, something went wrong when running that command

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.