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+.
pnpm --versionIf you see a version below 10, upgrade:
npm install -g pnpm@latest
# or via corepack (recommended)
corepack enable
corepack prepare pnpm@latest --activateNode version
Coldstart requires Node.js 24+ (LTS).
node --versionIf you see a version below 24, install Node 24:
nvm install 24
nvm use 24Or via Homebrew on macOS:
brew install node@24Port conflicts
Generated projects bind a few default ports in development:
| Service | Port |
|---|---|
| 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.
lsof -i :3000Portless 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:
PORTLESS=0 pnpm devOr use the pre-wired fallback script:
pnpm dev:no-tlsThis 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:
❌ Invalid environment variables:
{
DATABASE_URL: [ 'Required' ],
BETTER_AUTH_SECRET: [ 'Required' ]
}Fix
Copy the example file and fill in the values:
cp .env.example .envRequired variables vary per project, but typical ones are:
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string (Neon recommended) |
BETTER_AUTH_SECRET | Random 32+ char string for Better Auth sessions |
BETTER_AUTH_URL | Base URL of the API (e.g. https://api.<name>.localhost) |
RESEND_API_KEY | Resend API key for transactional emails |
STRIPE_SECRET_KEY / POLAR_ACCESS_TOKEN | Billing provider credentials |
Generate a secret with:
openssl rand -base64 32pnpm install fails
Network errors
If you see ERR_PNPM_FETCH or timeouts, it's usually a registry/network issue:
pnpm store prune
pnpm installPeer dependency warnings
Coldstart projects pin versions to keep the monorepo consistent. If you see peer warnings, run:
pnpm install --strict-peer-dependencies=falseThen open an issue on GitHub with the output so we can fix the pinning.
Workspace resolution errors
If pnpm complains about missing workspaces:
rm -rf node_modules **/node_modules
pnpm installcheck-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:
{
"dependencies": {
"@your-scope/db": "workspace:*"
}
}Then reinstall:
pnpm installDrizzle / Better Auth types out of date
If you edited a schema, regenerate types:
pnpm --filter @your-scope/db run generate
pnpm --filter @your-scope/api run auth:generateBuild failures
Next.js: ENOENT .next/server/...
Delete the .next directory and rebuild:
rm -rf apps/web/.next
pnpm --filter web run buildExpo: Metro bundler fails
Clear the Metro cache:
pnpm --filter mobile run start -- --clearStill 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.