Skip to main content
This guide will help you set up New Expensify for local development across all platforms.

Prerequisites

Before you begin, ensure you have the following installed:

Node.js

Version 20.20.0 (use nvm for easy version management)

npm

Version 10.8.2 (comes with Node.js)

Watchman

Required for React Native file watching

nvm

Recommended for Node.js version management

Getting Started

1

Install nvm and Node.js

Install nvm, then use it to install the correct Node.js version:
The project uses strict Node and npm versions defined in package.json and .nvmrc. The npm install command will fail if you’re not using the correct versions.
2

Install Watchman

Watchman is required for React Native’s file watching:
3

Install Dependencies

Install all project dependencies:
For standalone builds, use:
4

Run the Application

Start the development server for your desired platform:

Platform-Specific Setup

Web Development Setup

Configure HTTPS

The webpack development server uses HTTPS. On macOS, you can run:
This installs mkcert and generates valid certificates for dev.new.expensify.com and localhost.For other operating systems:
  1. Install mkcert
  2. Generate certificates:

Configure Local Hosts

Add this entry to your /etc/hosts file:

Run Development Server

The app will be available at https://dev.new.expensify.com:8082

Build for Production

To test a production build locally:
Access at http://localhost:8080

Environment Variables

Creating a .env file is not necessary for external contributors. It can lead to errors when variables get updated since your local .env file is ignored.

Key Environment Variables

Optional Performance Variables

If your .env changes aren’t working, try rm -rf .rock and re-run your platform command.

Running Tests

Common Issues

If you see CORS errors in the browser console:
You likely have a misconfigured .env file. Remove it and try again:
If npm install fails with a version error:
  1. Install nvm: brew install nvm
  2. Use the correct version: nvm install
  3. Set up automatic switching for zsh or bash
If you’re having HTTPS certificate issues:
  1. Ensure mkcert is installed: brew install mkcert
  2. Run: npm run setup-https
  3. Check that /etc/hosts contains: 127.0.0.1 dev.new.expensify.com
If you’re having MapBox SDK download issues:
  1. Run: npm run configure-mapbox
  2. Follow the prompts to set up your token
  3. See this Slack thread for Expensify employees

Next Steps

Authentication

Learn how to sign in and manage your session

Workspaces

Create and configure your first workspace

Contributing

Start contributing to the project

Architecture

Understand the codebase structure