coldstart

Troubleshooting

Common errors and fixes when scaffolding, installing, or running a Coldstart project

This guide collects the most common issues encountered when running coldstart or working with a generated project, along with their fixes.

Requirements check

Before anything else, make sure your environment meets the requirements.

pnpm version

Coldstart requires pnpm 10+.

Check your pnpm version
pnpm --version

If you see a version below 10, upgrade:

Upgrade pnpm
npm install -g pnpm@latest
# or via corepack (recommended)
corepack enable
corepack prepare pnpm@latest --activate

Node version

Coldstart requires Node.js 24+ (LTS).

Check your Node version
node --version

If you see a version below 24, install Node 24:

Install Node 24 via nvm
nvm install 24
nvm use 24

Or via Homebrew on macOS:

Install Node 24 via Homebrew
brew install node@24

Port conflicts

Generated projects bind a few default ports in development:

ServicePort
Web (Next.js)3000
API (Hono)3001
Email preview (React Email)3333

If one of these ports is already in use, pnpm dev will fail to start. Free the port, or use the portless fallback described below.

Find what's using a port (macOS/Linux)
lsof -i :3000

Portless issues

Coldstart generates projects using portless to expose stable HTTPS URLs like https://web.<name>.localhost in development. If portless fails (certificate issues, proxy not starting, DNS issues), fall back to plain HTTP:

Disable portless
PORTLESS=0 pnpm dev

Or use the pre-wired fallback script:

Run without portless
pnpm dev:no-tls

This serves the web app at http://localhost:3000 and the API at http://localhost:3001 without TLS.

Portless is only used by web and API apps. Mobile (Expo) always runs natively on device or simulator — it never uses portless.

Missing environment variables

All apps use @t3-oss/env to validate environment variables at startup. A typical error looks like:

Error output
❌ Invalid environment variables:
{
  DATABASE_URL: [ 'Required' ],
  BETTER_AUTH_SECRET: [ 'Required' ]
}

Fix

Copy the example file and fill in the values:

Bootstrap env files
cp .env.example .env

Required variables vary per project, but typical ones are:

VariableDescription
DATABASE_URLPostgreSQL connection string (Neon recommended)
BETTER_AUTH_SECRETRandom 32+ char string for Better Auth sessions
BETTER_AUTH_URLBase URL of the API (e.g. https://api.<name>.localhost)
RESEND_API_KEYResend API key for transactional emails
STRIPE_SECRET_KEY / POLAR_ACCESS_TOKENBilling provider credentials

Generate a secret with:

Generate a secure secret
openssl rand -base64 32

pnpm install fails

Network errors

If you see ERR_PNPM_FETCH or timeouts, it's usually a registry/network issue:

Clear pnpm cache and retry
pnpm store prune
pnpm install

Peer dependency warnings

Coldstart projects pin versions to keep the monorepo consistent. If you see peer warnings, run:

Install with strict peer checks disabled temporarily
pnpm install --strict-peer-dependencies=false

Then open an issue on GitHub with the output so we can fix the pinning.

Workspace resolution errors

If pnpm complains about missing workspaces:

Reinstall from scratch
rm -rf node_modules **/node_modules
pnpm install

check-types errors

The repo runs tsc --noEmit across all packages via pnpm check-types. Common causes:

Cannot find module

Most often this is a missing workspace dependency. Check package.json of the importing package and make sure the target package is listed under dependencies:

package.json
{
	"dependencies": {
		"@your-scope/db": "workspace:*"
	}
}

Then reinstall:

pnpm install

Drizzle / Better Auth types out of date

If you edited a schema, regenerate types:

Regenerate Drizzle + Better Auth types
pnpm --filter @your-scope/db run generate
pnpm --filter @your-scope/api run auth:generate

Build failures

Next.js: ENOENT .next/server/...

Delete the .next directory and rebuild:

rm -rf apps/web/.next
pnpm --filter web run build

Expo: Metro bundler fails

Clear the Metro cache:

pnpm --filter mobile run start -- --clear

Still stuck?

Open an issue on GitHub with your .coldstart.json, OS, Node version, and the full error output. The more context you provide, the faster it can be fixed.

On this page