react-nativeexpoeas

eas update command throws an error: Expected Metro server instance to have private functions exposed


After updating the expo SDK to Ver.51, I keep getting the following error after running eas update on Windows:

Error: Expected Metro server instance to have private functions exposed. [expo-cli] at forkMetroBuildAsync (C:\PATH_TO_MY_APP\node_modules@expo\cli\src\export\fork-bundleAsync.ts:287:11)
[expo-cli] at buildAsync (C:\PATH_TO_MY_APP\node_modules@expo\cli\src\export\fork-bundleAsync.ts:207:31) [expo-cli] at async Promise.all (index 0) [expo-cli] at bundleProductionMetroClientAsync (C:\PATH_TO_MY_APP\node_modules@expo\cli\src\export\fork-bundleAsync.ts:224:12) [expo-cli] at createBundlesAsync (C:\PATH_TO_MY_APP\node_modules@expo\cli\src\export\fork-bundleAsync.ts:86:19)
[expo-cli] at exportAppAsync (C:\PATH_TO_MY_APP\node_modules@expo\cli\src\export\exportApp.ts:92:19) [expo-cli] at exportAsync (C:\PATH_TO_MY_APP\node_modules@expo\cli\src\export\exportAsync.ts:19:3)

What I have been trying to do:

  1. I ran npx expo-doctor and npx expo install --check
  2. Delete the node_modules folder and package-lock then run again npm i
  3. eas logout then eas login
  4. Install the latest expo-cli

Nothing worked, what did I miss?


Solution

  • I had same issue after upgrading to SDK 51

    For me the fixes were: