- Home
- Skills
- DevOps & Cloud
- Vercel + Node/Express Deploy Doctor
Works with the AI Agents you already use
Vercel + Node/Express Deploy Doctor
by Imran Isah
Diagnose and fix Node.js/Express deployment errors, routing conflicts, and filesystem issues on Vercel.
$5.99
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
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.
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 use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 months ago
- Software
Node.js
Permissions
No special permissions declared or detected
What's inside
Frequently Asked Questions
New in DevOps & Cloud
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.