Error in upgrade to Expo SDK 44 - Failed to install expo package with error: yarnpkg exited with non-zero code: 134

  1. SDK Version: SDK 44
  2. Platforms(Android/iOS/web/all): Android/iOS

When I try to upgrade from Expo SDK 44 to 45, I get below error:
× Failed to install expo package with error: yarnpkg exited with non-zero code: 134
yarnpkg exited with non-zero code: 134
Error: yarnpkg exited with non-zero code: 134
at ChildProcess.completionListener (C:\Users\Racheh Lau\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\spawn-async\src\spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:520:26)
at ChildProcess.emit (events.js:400:28)
at ChildProcess.cp.emit (C:\Users\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

at spawnAsync (C:\Users\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\spawn-async\src\spawnAsync.ts:26:19)
at YarnPackageManager._runAsync (C:\Users\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\package-manager\src\NodePackageManagers.ts:327:31)
at YarnPackageManager.addWithParametersAsync (C:\Users\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\package-manager\src\NodePackageManagers.ts:272:16)
at YarnPackageManager.addAsync (C:\Users\AppData\Roaming\npm\node_modules\expo-cli\node_modules@expo\package-manager\src\NodePackageManagers.ts:276:5)
at upgradeAsync (C:\Users\AppData\Roaming\npm\node_modules\expo-cli\src\commands\info\upgradeAsync.ts:496:7)
at actionAsync (C:\Users\AppData\Roaming\npm\node_modules\expo-cli\src\commands\info\upgradeAsync.ts:42:3)

I tried yarn install as suggested in StackOverflow but did not work. Any ideas what is the problem? Many thanks!

It’s a bug in yarn that for some reason is causing it to stuck in some loop when resolving modules in some cases until it failed with OOM error

Deleting yarn.lock should fix it, but if you want to minimize changes in your dependencies you can try removing just @babel/core entry from yarn.lock

3 Likes

Thank you VERY much for the quick reply!! I deleted yarn.lock → yarn install → expo upgrade, and it works!!

Thank YOU!!

However, when I “expo start” it in simulator, here is an error:

Android Bundling failed 19384ms
While trying to resolve module idb from file C:\Users\Documents\App\coffee\node_modules\@firebase\app\dist\esm\index.esm2017.js, the package C:\Users\Documents\App\coffee\node_modules\idb\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (C:\Users\Documents\App\coffee\node_modules\idb\build\index.cjs. Indeed, none
of these files exist:

  • C:\Users\Documents\App\coffee\node_modules\idb\build\index.cjs(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
  • C:\Users\Documents\App\coffee\node_modules\idb\build\index.cjs\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

Instead, I just delete all @babel/core in yarn.lock → yarn install → expo upgrade. This time it really works!

2 Likes

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