Can't upgrade to new SDK

hello! i’m on mac osx. i have this message in the terminal: WARNING: The legacy expo-cli does not support Node +17. Migrate to the new local Expo CLI:

i tried to run expo upgrade in my project folder. i got this question: You are currently using SDK 31.0.0. Would you like to update to the latest version, 48.0.0?

i answered YES and then i got this error:

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 (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

at spawnAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
at NpmPackageManager._runAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/package-manager/src/NodePackageManagers.ts:166:31)
at NpmPackageManager.installAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/package-manager/src/NodePackageManagers.ts:82:16)
at NpmPackageManager.addWithParametersAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/package-manager/src/NodePackageManagers.ts:96:18)
at NpmPackageManager.addAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/package-manager/src/NodePackageManagers.ts:109:5)
at upgradeAsync (/usr/local/lib/node_modules/expo-cli/src/commands/info/upgradeAsync.ts:496:7)
at actionAsync (/usr/local/lib/node_modules/expo-cli/src/commands/info/upgradeAsync.ts:42:3)

What can I do? Please help!

Hi @aidar1987

Do you really have version 31.0.x of expo in your dependencies in packages.json?

Thank you! I did. I just uninstalled expo cli. and started a new project manually copypasting the app.js code and reinstalling all packages

1 Like

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