docs/pages/more/create-expo.mdx
import { Terminal } from '~/ui/components/Snippet';
create-expo-app is a command-line tool to create and set up a new Expo and React Native project. This tool simplifies the initialization process by providing various templates to get started quickly without the need for manual configuration.
To create a new project, run the following command:
<Terminal cmd={{ npm: ['$ npx create-expo-app@latest --template default@sdk-55'], yarn: ['$ yarn create expo-app --template default@sdk-55'], pnpm: ['$ pnpm create expo-app --template default@sdk-55'], bun: ['$ bun create expo --template default@sdk-55'], }} />
Note: During the SDK 55 transition period,
create-expo-app@latestwithout the--templateflag creates an SDK 54 project. If you plan to use Expo Go on a physical device, use an SDK 54 project. Otherwise, use--template default@sdk-55to create an SDK 55 project.
Running the above command will prompt you to enter the app name of your project. This app name is also used in the app config's name property.
<Terminal cmd={['What is your app named? my-app']} />
Uses the following options to customize the command behavior.
--yesUses the default options to create a new project.
--no-installSkips installing npm dependencies or CocoaPods.
--templateRunning create-expo-app with a Node Package Manager initializes and sets up a new Expo project using the default template.
You can use the --template option to select one of the following templates or pass it as an argument to the option. For example, --template default.
info Looking for more templates? Check out the
--exampleoption to initialize your project with one of the example apps that demonstrate specific features and integrations.
| Template | Description |
|---|---|
default | Default template. Designed to build multi-screen apps. Includes recommended tools such as Expo CLI, Expo Router library and TypeScript configuration enabled. Suitable for most apps. |
blank | Installs minimum required npm dependencies without configuring navigation. |
blank-typescript | A Blank template with TypeScript enabled. |
tabs | Installs and configures file-based routing with Expo Router and TypeScript enabled. |
bare-minimum | A Blank template with native directories (android and ios) generated. Runs npx expo prebuild during the setup. |
--exampleUse this option to initialize a project using an example from expo/examples.
For example:
npx create-expo-app --example with-router sets up a project with the Expo Router librarynpx create-expo-app --example with-react-navigation sets up a project similar to the default template, but configured with plain React Navigation library--versionPrints the version number and exits.
--helpPrints the list of available options and exits.
Creating a new project with create-expo-app also handles setting up additional configuration needed for a specific Node Package Manager.
If you are migrating from one package manager to another, you've to manually carry out the additional configuration in your project. If you are using EAS, you also have to configure your project for any additional required steps manually.
All the additional steps for each package manager are listed below.
npm is installed as part of Node.js installation. See Node.js documentation for installation instructions.
Supported by default if the project directory contains package-lock.json.
Yarn 1 (Classic) is usually installed as a global dependency of npm. See Yarn 1 documentation for installation instructions.
Supported by default if the project directory contains yarn.lock.
See Yarn documentation for installation instructions.
Yarn 2+ handles package management differently than Yarn 1. One of the core changes in Yarn 2+ is the Plug'n'Play (PnP) node linking model that does not work with React Native.
By default, a project created with create-expo-app and Yarn 2+ uses nodeLinker with its value set to node-modules to install dependencies.
nodeLinker: node-modules
Yarn Modern on EAS requires adding eas-build-pre-install hook. In your project's package.json, add the following configuration:
{
"scripts": {
"eas-build-pre-install": "corepack enable && yarn set version 4"
}
}
Requires installing Node.js. See pnpm documentation for installation instructions.
By default, a project created with create-expo-app and pnpm uses node-linker with its value set to hoisted to install dependencies.
node-linker=hoisted
info In SDK 54 and later, Expo supports isolated installations, and you can delete the
node-linkersetting if you prefer to use isolated dependencies.
Supported by default if the project directory contains pnpm-lock.yaml.
See Bun guide for details on creating a new Expo project with bun, migration from another package manager, and usage with EAS.