Skip to content
Agentic AI Builder's Guide

Search every lesson, prompt, glossary term and troubleshooting topic. Use ↑ ↓ to move and Enter to open.

Troubleshooting

Diagnose installation, GitHub, Git, startup, database, environment variable, build, networking, DNS and HTTPS problems.

Full printable guide

Most problems fall into a small number of categories. For each one below you will find symptoms, likely causes and fixes. If you are stuck, gather the exact error and context, remove secrets, and use the Bug Fixing or Railway Troubleshooting prompts.

Installation

SymptomCauseFix
code: command not foundVS Code shell command not installedCommand Palette → "Shell Command: Install 'code' command in PATH", then open a new terminal
claude: command not foundCLI not installed or not on PATHReinstall using the official instructions; open a new terminal; check echo $PATH
npm: command not foundNode.js not installedInstall the LTS version from nodejs.org or with a version manager
EACCES permission errors with npm global installsnpm global folder owned by another userUse the official installer for the tool, or a Node version manager; avoid sudo npm install -g
macOS blocks an app "from an unidentified developer"GatekeeperConfirm the download came from the official site, then allow it in System Settings → Privacy and Security
Extension not found in VS CodeSearch or marketplace issueSearch "Claude Code" and confirm the publisher is Anthropic; update VS Code

GitHub authentication

SymptomCauseFix
Authentication failed on pushNo credentials or expired tokenRun gh auth login, choose HTTPS, and authenticate Git with GitHub credentials
Permission denied (publickey)Remote uses SSH but no SSH key is configuredSwitch to HTTPS: git remote set-url origin https://github.com/USER/REPO.git, or set up an SSH key
Repository not foundWrong URL, wrong account, or no access to a private repoCheck git remote -v and gh auth status; confirm the repository exists under that account
Password rejectedGitHub no longer accepts account passwords for Git operationsUse gh auth login or a personal access token
bash
gh auth status
git remote -v

Git errors

SymptomCauseFix
not a git repositoryCommand run outside the project, or Git not initializedcd into the project; run git init if needed
rejected ... fetch firstRemote has commits you do not have locallygit pull --rebase then git push. Never force-push to resolve this on main
Merge conflictSame lines changed in two placesOpen the files in VS Code, choose the correct version, git add and commit; or ask Claude Code to resolve and explain
.env was committedMissing .gitignore entryAdd to .gitignore, git rm --cached .env, commit — and rotate every secret it contained
src refspec main does not match anyNo commits yet, or branch named differentlyMake a first commit; check git branch
Accidental changesEdits you want to discardReview with git status and git diff first; ask before running destructive commands like git reset --hard

Application startup

SymptomCauseFix
Cannot find module ...Dependencies not installednpm install
Port 3000 is already in useAnother server is runningStop it with Ctrl+C in its terminal, or use the port the framework suggests
Blank pageClient-side errorOpen the browser console and copy the first red error
Works for Claude Code but not for youDifferent terminal, folder or Node versionRun from the project root; compare node --version
Changes not visibleCached build or stale browser tabRestart the dev server; hard refresh with Cmd+Shift+R

Database connections

SymptomCauseFix
ECONNREFUSED locallyLocal database not runningStart the database, or use a separate development database
ECONNREFUSED or ENOTFOUND on RailwayWrong or missing DATABASE_URL referenceCheck the reference variable and that the database service name matches
password authentication failedStale credentials copied by handUse a reference variable instead of a copied value
relation "..." does not existMigrations not appliedRun the migration command for your ORM against the correct database
Too many connectionsEach request opens a new connectionAsk Claude Code to use a shared client or connection pooling
SSL errorsSSL mode mismatchCheck your ORM's documentation for the correct SSL settings for your host

Environment variables

SymptomCauseFix
undefined value at runtimeVariable not set in this environmentCompare Railway variables against .env.example
Variable set but not picked upService not redeployed, or set on the wrong serviceSet it on the application service and redeploy
Browser cannot read a variableClient-side variables require a public prefix in some frameworksUse the framework's public prefix only for non-secret values
Secret visible in browser sourceSecret given a public prefixRemove the prefix, move logic to the server, rotate the secret
Works locally, not in production.env exists only on your computerEvery variable must also be set in Railway

Build failures

SymptomCauseFix
Type errors only in production buildDevelopment server is more lenientRun npm run build locally and fix all errors
Import path works on Mac, fails on RailwayCase-insensitive macOS file systemMake import casing match file names exactly
JavaScript heap out of memoryLarge buildSimplify heavy imports, or ask ChatGPT for build memory options appropriate to your framework
Wrong Node versionPlatform default differs from localSpecify the version in package.json engines or as documented by Railway
Missing build-time variableValue required during buildSet it in Railway before building
bash
npm run build
npx tsc --noEmit

Railway networking

SymptomCauseFix
Deployment succeeds but URL shows an errorApp not listening on PORTUse the PORT environment variable
No public URLDomain not generatedGenerate a domain in the service networking settings
Health check failingWrong path or slow startConfirm path, check runtime logs
App cannot reach database privatelyPrivate hostname or port incorrect, or services in different environmentsUse the reference variable for the private URL; confirm both services are in the same project environment
Unexpected network costsDatabase traffic over the public URLUse the private connection variable

DNS

SymptomCauseFix
Domain not resolvingRecord missing, wrong name, or still propagatingCompare against Railway's values; check with dig; wait for propagation
app.example.com.example.comFull domain entered where provider appends itEnter only app in the name field
Apex domain will not accept a CNAMEProvider lacks CNAME flatteningUse a provider that supports ALIAS/flattening, or use www and redirect
Email stopped workingMX or TXT records deleted or changedRestore from your screenshot; only change records Railway requires
Railway shows domain not verifiedVerification record missing or incorrectAdd the exact record Railway displays
bash
dig app.example.com +short
dig app.example.com CNAME +short

HTTPS

SymptomCauseFix
Certificate warning right after setupCertificate not issued yetWait for verification and issuance, then retry
Certificate never issuesDNS points elsewhere, verification TXT record missing, or a DNS proxy interferesEnsure both the CNAME and TXT records match Railway exactly; with Cloudflare proxying, use SSL mode Full (not Full Strict)
Mixed content warningsPage loads http:// resourcesAsk Claude Code to use HTTPS or relative URLs
Sign-in redirect fails after domain changeCallback URL still points to old domainUpdate callback URLs and base URL variables

Still stuck?

Paste the full context into ChatGPT: what you were doing, what you expected, what happened, the exact error, what you have tried, and relevant configuration (without secrets). Ask for the most likely root cause, how to confirm it, and — if code must change — one consolidated LOW GAS Claude Code prompt.