Setup errors
Every message npm run setup can stop with, what it means, and how to fix it.
When setup stops, it prints the reason and then:
Setup stopped. Fix the problem above, then run `npm run setup` again; finished steps are kept.Find the reason below. Everything finished before the error is saved in .env.local.
Before setup starts
SyntaxError: Unexpected token or ERR_UNKNOWN_FILE_EXTENSION ".mts"
Why: your Node.js is older than 22.18, which can't run TypeScript files directly.
Fix: install Node.js 22.18 or newer (the current LTS from nodejs.org, or nvm install --lts). Check with node -v, then run setup again.
Cannot find module '@clack/prompts' (or any other package)
Why: dependencies aren't installed.
Fix: run npm install in the project folder, then setup again.
"Continue setup with the example plans anyway?"
Not an error. The site still says "Acme". Answer No, run Make it yours, then run setup again. See the warning.
Database
Neon API 401: …
Why: the Neon API key is wrong, was revoked, or was copied with a missing character.
Fix: create a new key at console.neon.tech → Account settings → API keys and paste it again.
Neon API 4xx: … limit … (project limit reached)
Why: your Neon plan allows a limited number of projects, and you've used them all.
Fix: delete a project you don't need in the Neon console, or put an existing connection string in .env.local as DATABASE_URL and choose Keep when setup asks. See Using an existing database.
Neon created the project but returned no connection string.
Why: rare. The project exists but Neon didn't return its connection details.
Fix: open the new project in the Neon console, click Connect, copy the connection string into .env.local as DATABASE_URL, and run setup again (choose Keep for the database).
Can't reach the database
Your network's DNS can't find ep-….neon.tech, but public DNS can.Why: your internet provider's DNS refuses Neon's hostnames. Common on some Indian ISPs (Jio, Airtel and others).
Fix: switch your computer to public DNS. See the steps for each system.
If the message is instead Can't reach ep-….neon.tech. Check your internet connection., public DNS can't find it either: check you're online, and that the database still exists in the Neon console.
Migrations failed (see the output above).
See Migrations fail.
Payments
Dodo rejected that API key in both test and live mode
Dodo rejected that API key in both test and live mode. Copy it again, then run `npm run setup` and choose to redo Dodo Payments.Why: Dodo didn't accept the key in either mode. Usually it was copied incompletely, has extra spaces, was deleted in Dodo, or the key's access doesn't include Read on Products.
Fix:
- In Dodo, Developer → API Keys, check the key still exists.
- If you're not sure you copied all of it, create a new one (Dodo only shows a key once). Click Select all and choose Write.
- Run
npm run setup, answer No to Dodo Payments is already set up. Keep it?, and paste it.
This Dodo API key can't create products
This Dodo API key can't create products. Use Edit Permissions on the key in Dodo (Developer → API Keys), click Select all and choose Write, then run `npm run setup` again.Why: the key has read access but not write access to Products.
Fix: in Dodo, Developer → API Keys, open the key's menu, choose Edit Permissions, click Select all, choose Write, save. Run setup again; you can keep the same key.
403 with IP_ADDRESS_NOT_ALLOWED
Why: the key has an IP Allowlist and your computer's address isn't on it.
Fix: edit the key in Dodo and empty the IP Allowlist. Your live site on Vercel has no fixed IP address, so an allowlist would block it too.
A plan says "created a new Dodo product" but I already had one
Why: setup finds products by a tag holding each plan's slug. Products you created by hand don't have the tag, and a changed slug counts as a new plan. Products in the other mode (test vs live) aren't visible either.
Fix: archive the duplicate in the Dodo dashboard. To use your hand-made product instead, put its ID in .env.local under the plan's productEnv.
Resend: API key is invalid
Why: the key is wrong or was deleted.
Fix: create a new key at resend.com → API Keys, with Full access, and run setup again.
Resend: This API key is restricted to only send emails
Why: you created a Sending access key. Setup needs Full access to add your domain.
Fix: create a Full access key and run setup again.
No Cloudflare zone found for yourdomain.com. Is the domain's DNS on this Cloudflare account?
Why: the Cloudflare token can't see a zone for that domain: the domain is on another Cloudflare account, its DNS isn't on Cloudflare, or the token was limited to other zones.
Fix: check the domain is listed on the Cloudflare account you made the token on, and that the token's Zone Resources include it. Otherwise choose I'll add them myself and add the records by hand.
Cloudflare: Authentication error / Invalid API Token
Why: the token is wrong or lacks permission to edit DNS.
Fix: create a token with the Edit zone DNS template, for the right zone, and run setup again.
For anything after the domain is added, see Email errors.
Deploy
Vercel login did not complete.
Why: the browser login was closed or timed out.
Fix: run setup again and finish the login in the browser. Or log in first with npx vercel login, then run setup.
Could not link the Vercel project.
Why: the Vercel CLI couldn't create or connect to the project. Common reasons: the name has characters Vercel doesn't allow, you're logged in to a team that can't create projects, or a network error.
Fix: use a name with only lowercase letters, numbers and hyphens. To see the CLI's own message, run npx vercel link in the project folder.
Could not set DATABASE_URL on Vercel: …
Why: the Vercel CLI refused to save an environment variable. The end of the message is Vercel's reason.
Fix: check you have permission to change the project's settings (on a team, you need a Member or Owner role). Run npx vercel env ls to test the CLI.
Deploy failed: followed by build output
Why: the project didn't build on Vercel. The lines shown are the end of the build log.
Fix: run npm run build on your computer: it usually fails the same way, with a clearer message. See Build errors. The full log is in the Vercel dashboard under Deployments.
Deployed, but couldn't read the production URL from the Vercel CLI output
Why: the deploy worked, but the Vercel CLI printed something setup didn't recognise.
Fix: find your address in the Vercel dashboard (project → Domains). Run setup again with deploy, and enter that address as the custom domain, so the webhook and app URL use it.
https://… didn't respond yet. If you used a custom domain, check it's connected in the Vercel dashboard.
Why: the site didn't answer within 30 seconds. A new domain whose DNS isn't set up yet is the usual reason; sometimes the first load is just slow.
Fix: open the address in your browser. If it loads, you're done. If you entered a custom domain, check Settings → Domains in Vercel shows Valid Configuration.
Other
Setup stopped with an error not listed here
- Read the line just above "Setup stopped". It's the real reason.
- Run setup again: network blips often go away.
- Still failing? Email support with that line.
I want to start setup from scratch
Delete .env.local (or the lines for the step you want to redo) and run npm run setup again. Resources already created (Neon project, Dodo products, Resend domain) are reused or can be deleted in each service's dashboard.