expo: EXPO SDK 45 BETA - error running upgrade - failed to install expo package expo@next

Summary

I run “EXPO_BETA=1 expo upgrade” and get the following output: 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:

✔️ Would you like to proceed? … yes

✔️ 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…

✖️ 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)

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

45

Environment

expo-env-info 1.0.3 environment info: System: OS: macOS 11.6.5 Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.6 - /usr/local/bin/node Yarn: 1.22.15 - ~/.yarn/bin/yarn npm: 6.14.15 - /usr/local/bin/npm Watchman: 2021.09.27.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: API Levels: 25, 26, 27, 28, 29, 30 Build Tools: 29.0.2, 29.0.3, 30.0.3, 31.0.0 System Images: android-28 | Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom IDEs: Android Studio: 3.6 AI-192.7142.36.36.6241897 Xcode: 12.4/12D4e - /usr/bin/xcodebuild npmPackages: @expo/webpack-config: ~0.16.2 => 0.16.18 babel-preset-expo: 9.0.2 => 9.0.2 expo: ^44.0.0 => 44.0.6 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-web: 0.17.1 => 0.17.1 npmGlobalPackages: expo-cli: 5.4.3 Expo Workflow: managed

Reproducible demo

NA

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (5 by maintainers)

Most upvoted comments

@todorone No worries, we luckily just figured this out thanks to https://github.com/facebook/react-native/issues/32027

tldr; Running yarn upgrade @babel/core before expo upgrade did the trick for us.

i was able to resolve by the following steps:

  1. delete yarn.lock
  2. delete node_modules
  3. run yarn install
  4. run expo upgrade

@brentvatne This is is still relevant for non-beta SDK 45 release. expo upgrade throws an error and only workaround mentioned by @sean-m-oleary works. This will be suboptimal upgrade DX, which is i guess critical for Expo ideology.

Hi, just ran into the same issue

- Installing the expo@^45.0.0 package...
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...

<--- Last few GCs --->

[53703:0x7f82b0008000]   122534 ms: Scavenge 4036.5 (4120.1) -> 4034.3 (4123.8) MB, 24.3 / 0.0 ms  (average mu = 0.512, current mu = 0.320) allocation failure
[53703:0x7f82b0008000]   122563 ms: Scavenge 4039.8 (4123.8) -> 4037.1 (4141.3) MB, 12.5 / 0.0 ms  (average mu = 0.512, current mu = 0.320) allocation failure
[53703:0x7f82b0008000]   124404 ms: Mark-sweep 4049.8 (4141.3) -> 4041.8 (4149.8) MB, 1798.3 / 0.0 ms  (average mu = 0.336, current mu = 0.122) allocation failure scavenge
might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0x10d6d6324 node::Abort() [/usr/local/Cellar/node@16/16.15.1/bin/node]
 2: 0x10d6d64a6 node::OnFatalError(char const*, char const*) [/usr/local/Cellar/node@16/16.15.1/bin/node]
 3: 0x10d817d85 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node@16/16.15.1/bin/node]
 4: 0x10d817d2f v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node@16/16.15.1/bin/node]
 5: 0x10d940bdb v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/Cellar/node@16/16.15.1/bin/node]
 6: 0x10d93fc5b v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/Cellar/node@16/16.
15.1/bin/node]
 7: 0x10d948231 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment)
[/usr/local/Cellar/node@16/16.15.1/bin/node]
 8: 0x10d948292 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment)
 [/usr/local/Cellar/node@16/16.15.1/bin/node]
 9: 0x10d9256f7 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/local/Cellar/node@16/16.15.1/bin/node]
10: 0x10dbbb7ca v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/usr/local/Cellar/node@16/16.15.1/bin/node]
11: 0x10de526b9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/usr/local/Cellar/node@16/16.15.1/bin/node]
✖ 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 (.../node_modules/@expo/spawn-async/src/spawnAsync.ts:64:13)
    at Object.onceWrapper (node:events:642:26)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Socket.<anonymous> (node:internal/child_process:451:11)
    at Socket.emit (node:events:527:28)
    at Pipe.<anonymous> (node:net:709:12)
    ...
    at spawnAsync (…/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
    at YarnPackageManager._runAsync .../node_modules/@expo/package-manager/src/NodePackageManagers.ts:314:31)
    at YarnPackageManager.addWithParametersAsync (.../node_modules/@expo/package-manager/src/NodePackageManagers.ts:259:16)
    at YarnPackageManager.addAsync (…/node_modules/@expo/package-manager/src/NodePackageManagers.ts:263:5)
    at upgradeAsync (…/node_modules/expo-cli/src/commands/info/upgradeAsync.ts:496:7)
    at actionAsync (…/node_modules/expo-cli/src/commands/info/upgradeAsync.ts:42:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I tried with

NODE_OPTIONS=--max_old_space_size=16384 EXPO_DEBUG=true expo upgrade

and still no luck ☹

I tried yarn upgrade @babel/core before doing it again, and it worked! 😃

@todorone No worries, we luckily just figured this out thanks to facebook/react-native#32027

tldr; Running yarn upgrade @babel/core before expo upgrade did the trick for us.

This did the trick! Thanks!

@brentvatne We’re running into the very same thing here. This is the first upgrade for us that doesn’t run seamless unfortunately.

i was able to resolve by the following steps:

  1. delete yarn.lock
  2. delete node_modules
  3. run yarn install
  4. run expo upgrade

This worked for me