Skip to main content
Expo CLI is available as the @expo/cli npm package. There are two primary ways to use it: via npx (recommended) or as a global installation. The recommended way to use Expo CLI is with npx, which runs the CLI without installing it globally:

Benefits of npx

  • Always uses the correct version for your project
  • No global installation required
  • Automatically updates when you run commands
  • Works seamlessly in CI/CD environments
  • Avoids version conflicts between projects

How it Works

When you run npx expo, it:
  1. Checks if expo is installed in your project’s node_modules
  2. Downloads and caches the latest version if not found
  3. Executes the command with the appropriate version

Global Installation

You can install Expo CLI globally if you prefer to have it available system-wide:
After global installation, you can run commands without npx:

Considerations for Global Installation

  • You may need to manually update the CLI to get new features
  • Different projects might need different CLI versions
  • Can cause conflicts if projects expect specific versions
  • Requires administrative permissions on some systems

Project-Level Installation

Expo CLI is typically included as a dependency when you create a new Expo project. You can also add it manually:
Then run it via your package manager:

Version Management

Checking Your Version

This displays the current version of Expo CLI being used.

Upgrading Expo CLI

When using npx, you automatically get the latest version. For global installations:

Pinning to a Specific Version

If you need a specific version for compatibility:
Or in your package.json:

Verifying Installation

After installation, verify that Expo CLI is working:
You should see a list of available commands:

Node.js Requirements

Expo CLI requires Node.js version 20.19.4 or newer. Check your Node.js version:
If you need to upgrade Node.js, download the latest LTS version from nodejs.org.

Using Version Managers

We recommend using a Node.js version manager like nvm or fnm:

Troubleshooting

Command Not Found

If you get “command not found” errors:
  1. Ensure Node.js and npm are installed
  2. Check that your PATH includes npm global binaries
  3. Try closing and reopening your terminal
  4. Use npx expo instead of expo

Permission Errors

On macOS/Linux, if you get permission errors with global installation:

Version Conflicts

If you have multiple versions installed:

CI/CD Environments

For continuous integration, always use npx or install as a dev dependency:
This ensures consistent versions across all environments.