- Home
- Skills
- DevOps & Cloud
- Vercel + Node/Express Deploy Doctor
Works with the AI tools you already use
Vercel + Node/Express Deploy Doctor
Diagnose and fix Node.js/Express deployment errors, routing conflicts, and filesystem issues on Vercel.
Free
Vercel + Node/Express Deploy Doctor
Example session with this skill installed
My Express app works fine on my laptop, but when I deploy to Vercel, my /api/users route gives a 404, and my file uploads to the 'uploads' folder aren't appearing. Here is my server.js.
- Read your context and instructions
- Compiled the vercel + node
- Generated the UI component
The 404 on your /api/users route and the disappearing uploads are both symptoms of the transition from a persistent server to Vercel's serverless architecture. In your server.js, you are using app.listen(), which Vercel ignores, and you are attempting to write to the local filesystem, which is read-only and non-persistent in a serverless function.
Vercel Deployment Diagnosis
| Issue | Root Cause | Evidence | Required Fix |
|---|---|---|---|
| Routing 404 | Entry Point Mismatch | server.js uses app.listen() instead of exporting the Express instance. | Export the app via module.exports = app; and add a vercel.json rewrite. |
| Missing Uploads | Ephemeral Filesystem | Writing to /uploads folder. Serverless storage is non-persistent. | Use Vercel Blobs, AWS S3, or another external object storage provider. |
| Function Lifecycle | Serverless Model | App expects a long-running process to handle multiple requests. | Restructure to handle stateless, atomic requests per function invocation. |
Implementation Details
Add a vercel.json to your root directory to route all traffic to your Express entry point:
{
"rewrites": [{ "source": "/(.*)", "destination": "/server.js" }]
}
Update the bottom of your server.js:
// Remove app.listen(3000...);
module.exports = app;
Next steps
- Move any file upload logic to use an external SDK (like
@vercel/blob). - Update
server.jsto export theappobject instead of calling.listen(). - Deploy via
vercel --prodto apply the newvercel.jsonrouting rules.
vercel-node-express-deploy-doctor.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Deploying Node.js or Express applications to Vercel often leads to failures that are impossible to replicate locally. This skill identifies the disconnect between a traditional long-running server and Vercel's serverless execution model, pinpointing why builds fail, routes 404, or files disappear. It eliminates the guesswork of debugging production-only errors by focusing on the architectural constraints of the Vercel runtime.
What it does
- Diagnoses build failures by analyzing Vercel dashboard logs for case-sensitivity issues, Node version mismatches, and missing build steps.
- Fixes routing errors where Express apps work locally but return 404 or 500 on Vercel due to incorrect
vercel.jsonrewrites or entry point exports. - Resolves filesystem issues by identifying illegal local writes to read-only serverless environments and suggesting external storage alternatives.
- Optimizes timeouts by identifying operations like LLM calls or slow DB queries that exceed Vercel's plan-specific function limits.
- Audits environment variables to ensure proper scoping across Production, Preview, and Development environments.
How it works
- Analyze logs and config to compare local behavior against Vercel's serverless runtime constraints.
- Identify the failure category from build logs, routing mismatches, filesystem writes, or execution timeouts.
- Apply the triage protocol to determine if the issue is architectural, such as
app.listen()usage or non-persistent disk writes. - Provide a concrete fix including code changes,
vercel.jsonupdates, or environment variable adjustments.
Frameworks & tools
Node.js, Express, Vercel CLI, Vercel Serverless Functions, and vercel.json configuration.
Why this beats prompting it yourself
Generic prompts often miss the nuances of the serverless lifecycle, such as why a file write "succeeds" but the data vanishes instantly. This skill uses a targeted triage protocol specifically for the Vercel runtime, saving hours of chasing phantom bugs that don't exist in your local environment.
Use cases
- Migrating a legacy Express server to a serverless Vercel deployment.
- Troubleshooting a route that works in
npm run devbut 404s in production. - Fixing "missing" files or database uploads that aren't persisting between requests.
- Debugging intermittent 504 errors on long-running API calls.
Known limitations
Does not debug general JavaScript logic errors unrelated to the Vercel environment. Limited to Node.js and Express; does not support non-Vercel hosting providers.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 1 day ago
- Free to download with an account