EXPO45 BETA Upgrade fails to install expo@next package

I’m on expo sdk 44 and trying to run the expo 45 beta upgrade and it starts to install the expo@next package then bombs with the following error:

… % EXPO_BETA=1 expo upgrade

Warning! Your git working tree is dirty.
It’s recommended to commit all your changes before proceeding, so you can revert the changes made by this command if necessary.

:heavy_check_mark: Would you like to proceed? … yes

:heavy_check_mark: You are currently using SDK 44.0.0. Would you like to update to the latest version, 45.0.0? … yes

⠦ Installing the expo@next package…

:heavy_multiplication_x: Failed to install expo package with error: yarnpkg exited with signal: SIGABRT
yarnpkg exited with signal: SIGABRT
Error: yarnpkg exited with signal: SIGABRT
at ChildProcess.completionListener (/Users/soleary/.config/yarn/global/node_modules/@expo/spawn-async/src/spawnAsync.ts:64:13)
at Object.onceWrapper (events.js:520:26)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1055:16)
at Socket. (internal/child_process.js:441:11)
at Socket.emit (events.js:400:28)
at Pipe. (net.js:675:12)

at spawnAsync (/Users/soleary/.config/yarn/global/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
at YarnPackageManager._runAsync (/Users/soleary/.config/yarn/global/node_modules/expo-cli/node_modules/@expo/package-manager/src/NodePackageManagers.ts:327:31)
at YarnPackageManager.addWithParametersAsync (/Users/soleary/.config/yarn/global/node_modules/expo-cli/node_modules/@expo/package-manager/src/NodePackageManagers.ts:272:16)
at YarnPackageManager.addAsync (/Users/soleary/.config/yarn/global/node_modules/expo-cli/node_modules/@expo/package-manager/src/NodePackageManagers.ts:276:5)
at upgradeAsync (/Users/soleary/.config/yarn/global/node_modules/expo-cli/src/commands/info/upgradeAsync.ts:496:7)
at actionAsync (/Users/soleary/.config/yarn/global/node_modules/expo-cli/src/commands/info/upgradeAsync.ts:42:3)

Hey @soleary-venterra, can you run npx expo-env-info and share what’s printed out?

I just tested upgrading a freshly init’d project and it worked as expected.

Hi @soleary-venterra and @adamjnav

I ran into this as well for a test app that is pretty much just a newly created Expo SDK 44 app created a while ago. I think this might be a yarn bug, because I get this crash when I just copy package.json and yarn.lock to a new directory and then run yarn followed by yarn add expo@next. Strangely I can create a new SDK 44 app and upgrade that without problems. I have not yet been able to find the exact cause of the problem:

% ls -a
.		..		package.json	yarn.lock
% yarn
yarn install v1.22.18
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "react-native > react-native-codegen > jscodeshift@0.11.0" has unmet peer dependency "@babel/preset-env@^7.1.6".
[4/4] 🔨  Building fresh packages...
✨  Done in 2.98s.
% yarn add expo@next
yarn add v1.22.18
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "react-native > react-native-codegen > jscodeshift@0.11.0" has unmet peer dependency "@babel/preset-env@^7.1.6".

<--- Last few GCs --->

[9726:0x140008000]    53080 ms: Scavenge 2041.6 (2081.0) -> 2040.9 (2081.8) MB, 2.2 / 0.0 ms  (average mu = 0.309, current mu = 0.327) allocation failure
[9726:0x140008000]    53100 ms: Scavenge 2042.1 (2081.8) -> 2041.5 (2082.3) MB, 18.1 / 0.0 ms  (average mu = 0.309, current mu = 0.327) allocation failure
[9726:0x140008000]    53105 ms: Scavenge 2042.8 (2082.3) -> 2042.1 (2086.8) MB, 2.8 / 0.0 ms  (average mu = 0.309, current mu = 0.327) allocation failure


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x1049b85d4 node::Abort() [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
[...]
51: 0x10498e670 node::Start(int, char**) [/opt/homebrew/Cellar/node@16/16.14.2/bin/node]
52: 0x106d390f4
zsh: abort      yarn add expo@next

And the relevant parts of my environment:

    System:
      OS: macOS 12.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.14.2 - /opt/homebrew/opt/node@16/bin/node
      Yarn: 1.22.18 - /opt/homebrew/bin/yarn
      npm: 8.5.0 - /opt/homebrew/opt/node@16/bin/npm
    npmGlobalPackages:
      eas-cli: 0.52.0
      expo-cli: 5.4.3

package.json:

{
  "name": "deps",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "~44.0.0",
    "expo-status-bar": "~1.2.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-web": "0.17.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

But if I remove yarn.lock (and node_modules for good measure) and then re-run yarn before running yarn add expo@next it works! (So EXPO_BETA=1 expo upgrade works too.)

1 Like

This worked for me thank you!

1 Like

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