Troubleshooting center

Something broke?
Start here.

Problems organised by where they happen — from installation to networking. Each entry explains the cause, the fix, and the exact commands to run.

Installation

'node' or 'npm' is not recognized
Cause

Node.js is not installed, or your terminal was opened before installation finished so PATH was not refreshed.

Fix

Install Node.js LTS, then close every terminal (and your editor) and open a new one.

Run
node -v
npm -v
Installer fails with "not enough space"
Cause

The SDK, system images and emulator need 15 GB or more.

Fix

Free space or install the SDK to another drive via Android Studio → Settings → Android SDK Location.

Tool Problems

SDK location not found. Define ANDROID_HOME
Cause

The ANDROID_HOME environment variable is missing.

Fix

Set ANDROID_HOME to your SDK folder and add platform-tools to PATH. See the SDK setup guide.

Run
echo $ANDROID_HOME
adb --version
Note

On Windows the SDK is usually at C:\Users\<you>\AppData\Local\Android\Sdk

Build Errors

"Missing script: reset-project"
Cause

You are not inside the project folder, or your template has no reset script.

Fix

cd into the project folder, then list the available scripts.

Run
cd my-team-app
npm run
'npxexpo' is not recognized
Cause

A missing space.

Fix

It is two words — npx expo start.

Run
npx expo start
Port 8081 is already in use
Cause

Another Metro server is still running (often in a forgotten terminal tab).

Fix

Stop the other server with Ctrl + C, or free the port.

Run
npx kill-port 8081
Unable to resolve module …
Cause

A package is not installed, or an import path is misspelled (paths are case-sensitive).

Fix

Check the import path. If it is a package, install it and restart with a clean cache.

Run
npx expo install <package>
npx expo start -c

Runtime Errors

Red error screen on launch
Cause

A JavaScript error was thrown while rendering.

Fix

Read the first line — it names the error and the file. Tap the stack trace to jump to the exact line.

TypeError: undefined is not an object
Cause

You accessed a property of a value that hasn't loaded yet — typically API data on first render.

Fix

Guard with optional chaining (data?.items) or render a loading state until data exists.

Emulator Problems

Emulator is very slow or refuses to start
Cause

Hardware virtualisation is disabled.

Fix

Enable VT-x / AMD-V in BIOS/UEFI. On Windows, enable "Windows Hypervisor Platform" in Windows Features.

adb shows the emulator as "offline"
Cause

The ADB server lost connection.

Fix

Restart the ADB server.

Run
adb kill-server
adb start-server
adb devices
"Project is incompatible with this version of Expo Go"
Cause

Expo Go only supports one Expo SDK version at a time.

Fix

Update Expo Go from the store. Check your project SDK version.

Run
npx expo --version
npx expo install --fix
Expo Go can't connect to the dev server
Cause

Phone and laptop on different networks, or campus Wi-Fi blocks device-to-device traffic.

Fix

Use the same network, or tunnel mode. Or press a to use the Android emulator.

Run
npx expo start --tunnel

Git Problems

"Authentication failed" on git push
Cause

GitHub no longer accepts account passwords over HTTPS.

Fix

Sign in with the GitHub CLI or Git Credential Manager, or use a personal access token.

Run
gh auth login
"error: remote origin already exists"
Fix

Point origin at the correct URL instead of adding it again.

Run
git remote -v
git remote set-url origin <repository-url>
"error: src refspec main does not match any"
Cause

No commit yet, or the branch is not named main.

Fix

Commit first, then rename the branch and push.

Run
git add .
git commit -m "First commit"
git branch -M main
git push -u origin main
"Updates were rejected because the remote contains work that you do not have"
Cause

A teammate pushed first.

Fix

Pull their changes, then push again.

Run
git pull --rebase
git push
403 / "Permission denied" when pushing to the team repo
Cause

You are not a collaborator yet, or you have not accepted the invite.

Fix

The repo owner adds you in Settings → Collaborators. Accept the email invite, then push again.

I committed on main instead of my branch
Fix

Create your branch from here (it keeps the commit), push it, and ask the leader not to push main until you merge.

Run
git switch -c <your-name>
git push -u origin <your-name>
CONFLICT (content) — merge conflict
Cause

The same lines changed on both sides.

Fix

Open the files marked as conflicted, choose which changes to keep, remove the <<<<<<< ======= >>>>>>> markers, then stage and commit.

Run
git status
git add <file>
git commit

Networking / API Problems

"Network request failed" when calling a local API
Cause

On a phone or emulator, "localhost" points to the device itself, not your computer.

Fix

Use your computer's LAN IP (e.g. 192.168.1.20), or 10.0.2.2 from the Android emulator. Make sure the server listens on 0.0.0.0.

Run
ipconfig
HTTP request blocked on Android
Cause

Android blocks plain http:// traffic by default.

Fix

Use https:// endpoints. For local development only, allow cleartext in the app config.