npm install --global expo-cli fails, or the legacy expo-cli will not run on new Node.js
npm install expo-cli --global failsShort answer
The global expo-cli is the legacy tool: its repository is archived and read-only. Current Expo projects use the CLI that ships inside the expo package. Stop installing expo-cli globally; run npx expo start in a project, and create projects with npx create-expo-app@latest on a Node.js LTS release.
Fix it fast
1Find out which cause you have
See whether a legacy global expo-cli is installed, and which Node.js you run. The local CLI needs neither a global install nor an old Node.js.
node --version npm ls -g --depth=02Match what you see, then jump to its fix
What does the error look like?
npm install expo-cli --global failsThe legacy expo-cli does not support Node +17
Cause 1 of 2
You are using the legacy global CLI
1Check
The expo-cli repository says it holds packages of the legacy global Expo CLI, and was archived by its owner in January 2024. The modern CLI is included in the expo package and needs no separate install.
npm ls -g --depth=0 | grep expo2Fix
Remove the global package and use the local CLI from the project folder.
npm uninstall --global expo-cli
npx expo start3Verify
The dev server starts from the project's own expo package.
npx expo --versionConfirmed by github.com
Cause 2 of 2
You need a new project and are following an old init step
1Check
Project creation has its own tool now. The create-a-project guide lists create-expo-app for npm, yarn, pnpm and bun, and asks for Node.js LTS.
node --version2Fix
Create the project with create-expo-app on a Node.js LTS release, then start it with the local CLI.
npx create-expo-app@latest my-app
cd my-app
npx expo start3Verify
The dev server prints its QR code and the development URL.
npx expo startConfirmed by docs.expo.dev
How do I stop it coming back?
- Use npx expo in project scripts, so every machine uses the CLI version pinned in package.json.
- Run Node.js LTS for new Expo projects, as the Expo guide recommends.
- Do not copy a global-install step from an old tutorial; check the date and the Expo docs first.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Mobile apps
appium driver install uiautomator2 fails or the driver will not start
Error installing uiautomator2 driver
Run appium driver install uiautomator2 with the Appium server stopped, on a Node.js and npm version Appium supports (Node ^20.19, ^22.12 or 24+, npm 10+).
3 causes, each with a fixMobile apps
Appium returns 'The requested resource could not be found' (404)
http://localhost:4723/wd/hub
The client is calling a URL the server does not serve.
2 causes, each with a fixMobile apps
Capacitor does not find index.html for a Vue app inside Laravel
the web app files are not found by Capacitor after npx cap sync
Capacitor copies the folder named in webDir, and that folder must hold the final index.html.
3 causes, each with a fixMobile apps
Expo cannot start the Android emulator: spawn adb ENOENT
spawn adb ENOENT
ENOENT means the tool that launched adb could not find an executable named adb on your PATH.
3 causes, each with a fixMobile apps
Expo says it is unable to find expo in this project
Unable to find expo in this project - have you run yarn / npm install yet?
The Expo CLI ships inside the expo package, so the project must have expo as a dependency and installed in its own node_modules.
3 causes, each with a fixMobile apps
FCM rejects the message with INVALID_ARGUMENT
HTTP 400 from fcm.googleapis.com/v1/projects/PROJECT_ID/messages:send
INVALID_ARGUMENT is HTTP 400: FCM did not accept the request parameters.
3 causes, each with a fix