@intentsolutionsio/vercel-pack 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +67 -44
  3. package/package.json +4 -4
  4. package/skills/vercel-advanced-troubleshooting/SKILL.md +185 -195
  5. package/skills/vercel-advanced-troubleshooting/references/errors.md +11 -0
  6. package/skills/vercel-advanced-troubleshooting/references/evidence-collection-framework.md +34 -0
  7. package/skills/vercel-advanced-troubleshooting/references/examples.md +11 -0
  8. package/skills/vercel-advanced-troubleshooting/references/systematic-isolation.md +56 -0
  9. package/skills/vercel-advanced-troubleshooting/references/timing-analysis.md +35 -0
  10. package/skills/vercel-architecture-variants/SKILL.md +227 -216
  11. package/skills/vercel-architecture-variants/references/errors.md +11 -0
  12. package/skills/vercel-architecture-variants/references/examples.md +12 -0
  13. package/skills/vercel-architecture-variants/references/variant-a-monolith-(simple).md +44 -0
  14. package/skills/vercel-architecture-variants/references/variant-b-service-layer-(moderate).md +72 -0
  15. package/skills/vercel-architecture-variants/references/variant-c-microservice-(complex).md +81 -0
  16. package/skills/vercel-ci-integration/SKILL.md +183 -73
  17. package/skills/vercel-ci-integration/references/errors.md +10 -0
  18. package/skills/vercel-ci-integration/references/examples.md +36 -0
  19. package/skills/vercel-ci-integration/references/implementation.md +54 -0
  20. package/skills/vercel-common-errors/SKILL.md +164 -60
  21. package/skills/vercel-common-errors/references/errors.md +53 -0
  22. package/skills/vercel-common-errors/references/examples.md +23 -0
  23. package/skills/vercel-cost-tuning/SKILL.md +158 -145
  24. package/skills/vercel-cost-tuning/references/cost-estimation.md +34 -0
  25. package/skills/vercel-cost-tuning/references/cost-reduction-strategies.md +40 -0
  26. package/skills/vercel-cost-tuning/references/errors.md +11 -0
  27. package/skills/vercel-cost-tuning/references/examples.md +15 -0
  28. package/skills/vercel-data-handling/SKILL.md +202 -155
  29. package/skills/vercel-data-handling/references/errors.md +11 -0
  30. package/skills/vercel-data-handling/references/examples.md +27 -0
  31. package/skills/vercel-data-handling/references/implementation.md +223 -0
  32. package/skills/vercel-debug-bundle/SKILL.md +163 -67
  33. package/skills/vercel-debug-bundle/references/errors.md +12 -0
  34. package/skills/vercel-debug-bundle/references/examples.md +24 -0
  35. package/skills/vercel-debug-bundle/references/implementation.md +54 -0
  36. package/skills/vercel-deploy-integration/SKILL.md +163 -156
  37. package/skills/vercel-deploy-integration/references/errors.md +11 -0
  38. package/skills/vercel-deploy-integration/references/examples.md +21 -0
  39. package/skills/vercel-deploy-integration/references/google-cloud-run.md +36 -0
  40. package/skills/vercel-deploy-integration/references/vercel-deployment.md +35 -0
  41. package/skills/vercel-deploy-preview/SKILL.md +164 -39
  42. package/skills/vercel-edge-functions/SKILL.md +185 -37
  43. package/skills/vercel-enterprise-rbac/SKILL.md +185 -170
  44. package/skills/vercel-enterprise-rbac/references/errors.md +11 -0
  45. package/skills/vercel-enterprise-rbac/references/examples.md +12 -0
  46. package/skills/vercel-enterprise-rbac/references/role-implementation.md +33 -0
  47. package/skills/vercel-enterprise-rbac/references/sso-integration.md +35 -0
  48. package/skills/vercel-hello-world/SKILL.md +141 -55
  49. package/skills/vercel-incident-runbook/SKILL.md +186 -138
  50. package/skills/vercel-incident-runbook/references/errors.md +11 -0
  51. package/skills/vercel-incident-runbook/references/examples.md +10 -0
  52. package/skills/vercel-incident-runbook/references/immediate-actions-by-error-type.md +41 -0
  53. package/skills/vercel-install-auth/SKILL.md +130 -53
  54. package/skills/vercel-known-pitfalls/SKILL.md +235 -233
  55. package/skills/vercel-known-pitfalls/references/errors.md +11 -0
  56. package/skills/vercel-known-pitfalls/references/examples.md +12 -0
  57. package/skills/vercel-load-scale/SKILL.md +197 -204
  58. package/skills/vercel-load-scale/references/capacity-planning.md +47 -0
  59. package/skills/vercel-load-scale/references/errors.md +11 -0
  60. package/skills/vercel-load-scale/references/examples.md +26 -0
  61. package/skills/vercel-load-scale/references/load-testing-with-k6.md +59 -0
  62. package/skills/vercel-load-scale/references/scaling-patterns.md +65 -0
  63. package/skills/vercel-local-dev-loop/SKILL.md +159 -71
  64. package/skills/vercel-local-dev-loop/references/errors.md +11 -0
  65. package/skills/vercel-local-dev-loop/references/examples.md +21 -0
  66. package/skills/vercel-local-dev-loop/references/implementation.md +60 -0
  67. package/skills/vercel-migration-deep-dive/SKILL.md +202 -187
  68. package/skills/vercel-migration-deep-dive/references/errors.md +11 -0
  69. package/skills/vercel-migration-deep-dive/references/examples.md +12 -0
  70. package/skills/vercel-migration-deep-dive/references/implementation-plan.md +80 -0
  71. package/skills/vercel-migration-deep-dive/references/pre-migration-assessment.md +39 -0
  72. package/skills/vercel-multi-env-setup/SKILL.md +167 -164
  73. package/skills/vercel-multi-env-setup/references/configuration-structure.md +59 -0
  74. package/skills/vercel-multi-env-setup/references/errors.md +11 -0
  75. package/skills/vercel-multi-env-setup/references/examples.md +11 -0
  76. package/skills/vercel-observability/SKILL.md +205 -195
  77. package/skills/vercel-observability/references/alert-configuration.md +40 -0
  78. package/skills/vercel-observability/references/errors.md +11 -0
  79. package/skills/vercel-observability/references/examples.md +13 -0
  80. package/skills/vercel-observability/references/metrics-collection.md +65 -0
  81. package/skills/vercel-performance-tuning/SKILL.md +212 -156
  82. package/skills/vercel-performance-tuning/references/caching-strategy.md +49 -0
  83. package/skills/vercel-performance-tuning/references/errors.md +11 -0
  84. package/skills/vercel-performance-tuning/references/examples.md +13 -0
  85. package/skills/vercel-policy-guardrails/SKILL.md +276 -193
  86. package/skills/vercel-policy-guardrails/references/errors.md +11 -0
  87. package/skills/vercel-policy-guardrails/references/eslint-rules.md +46 -0
  88. package/skills/vercel-policy-guardrails/references/examples.md +10 -0
  89. package/skills/vercel-prod-checklist/SKILL.md +219 -94
  90. package/skills/vercel-prod-checklist/references/errors.md +11 -0
  91. package/skills/vercel-prod-checklist/references/examples.md +25 -0
  92. package/skills/vercel-prod-checklist/references/implementation.md +60 -0
  93. package/skills/vercel-rate-limits/SKILL.md +187 -100
  94. package/skills/vercel-rate-limits/references/errors.md +11 -0
  95. package/skills/vercel-rate-limits/references/examples.md +46 -0
  96. package/skills/vercel-rate-limits/references/implementation.md +66 -0
  97. package/skills/vercel-reference-architecture/SKILL.md +226 -180
  98. package/skills/vercel-reference-architecture/references/errors.md +11 -0
  99. package/skills/vercel-reference-architecture/references/examples.md +13 -0
  100. package/skills/vercel-reference-architecture/references/key-components.md +65 -0
  101. package/skills/vercel-reference-architecture/references/project-structure.md +40 -0
  102. package/skills/vercel-reliability-patterns/SKILL.md +272 -211
  103. package/skills/vercel-reliability-patterns/references/circuit-breaker.md +36 -0
  104. package/skills/vercel-reliability-patterns/references/dead-letter-queue.md +48 -0
  105. package/skills/vercel-reliability-patterns/references/errors.md +11 -0
  106. package/skills/vercel-reliability-patterns/references/examples.md +11 -0
  107. package/skills/vercel-reliability-patterns/references/idempotency-keys.md +36 -0
  108. package/skills/vercel-sdk-patterns/SKILL.md +264 -92
  109. package/skills/vercel-sdk-patterns/references/errors.md +11 -0
  110. package/skills/vercel-sdk-patterns/references/examples.md +45 -0
  111. package/skills/vercel-sdk-patterns/references/implementation.md +67 -0
  112. package/skills/vercel-security-basics/SKILL.md +186 -96
  113. package/skills/vercel-security-basics/references/errors.md +10 -0
  114. package/skills/vercel-security-basics/references/examples.md +70 -0
  115. package/skills/vercel-security-basics/references/implementation.md +39 -0
  116. package/skills/vercel-upgrade-migration/SKILL.md +167 -67
  117. package/skills/vercel-upgrade-migration/references/errors.md +10 -0
  118. package/skills/vercel-upgrade-migration/references/examples.md +51 -0
  119. package/skills/vercel-upgrade-migration/references/implementation.md +29 -0
  120. package/skills/vercel-webhooks-events/SKILL.md +208 -132
  121. package/skills/vercel-webhooks-events/references/errors.md +11 -0
  122. package/skills/vercel-webhooks-events/references/event-handler-pattern.md +37 -0
  123. package/skills/vercel-webhooks-events/references/examples.md +16 -0
  124. package/skills/vercel-webhooks-events/references/signature-verification.md +33 -0
@@ -1,109 +1,213 @@
1
1
  ---
2
2
  name: vercel-common-errors
3
- description: |
4
- Diagnose and fix Vercel common errors and exceptions.
5
- Use when encountering Vercel errors, debugging failed requests,
6
- or troubleshooting integration issues.
3
+ description: 'Diagnose and fix common Vercel deployment and function errors.
4
+
5
+ Use when encountering Vercel errors, debugging failed deployments,
6
+
7
+ or troubleshooting serverless function issues.
8
+
7
9
  Trigger with phrases like "vercel error", "fix vercel",
8
- "vercel not working", "debug vercel".
9
- allowed-tools: Read, Grep, Bash(curl:*)
10
+
11
+ "vercel not working", "debug vercel", "vercel 500", "vercel build failed".
12
+
13
+ '
14
+ allowed-tools: Read, Grep, Bash(vercel:*), Bash(curl:*)
10
15
  version: 1.0.0
11
16
  license: MIT
12
17
  author: Jeremy Longshore <jeremy@intentsolutions.io>
18
+ tags:
19
+ - saas
20
+ - vercel
21
+ - debugging
22
+ - errors
23
+ compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw
13
24
  ---
14
-
15
25
  # Vercel Common Errors
16
26
 
17
27
  ## Overview
18
- Quick reference for the top 10 most common Vercel errors and their solutions.
28
+
29
+ Diagnose and resolve the most common Vercel errors across three layers: build pipeline, serverless function runtime, and edge network. Each error includes the error code, root cause, and step-by-step fix.
19
30
 
20
31
  ## Prerequisites
21
- - Vercel SDK installed
22
- - API credentials configured
23
- - Access to error logs
32
+
33
+ - Vercel CLI installed
34
+ - Access to deployment logs (`vercel logs <url>`)
35
+ - Access to Vercel dashboard for build logs
24
36
 
25
37
  ## Instructions
26
38
 
27
- ### Step 1: Identify the Error
28
- Check error message and code in your logs or console.
39
+ ### Step 1: Identify the Error Layer
29
40
 
30
- ### Step 2: Find Matching Error Below
31
- Match your error to one of the documented cases.
41
+ ```text
42
+ # Check deployment status and error details
43
+ vercel inspect <deployment-url>
32
44
 
33
- ### Step 3: Apply Solution
34
- Follow the solution steps for your specific error.
45
+ # View function runtime logs
46
+ vercel logs <deployment-url> --follow
35
47
 
36
- ## Output
37
- - Identified error cause
38
- - Applied fix
39
- - Verified resolution
48
+ # View build logs via API
49
+ curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
50
+ "https://api.vercel.com/v13/deployments/dpl_xxx" | jq '.state, .errorMessage'
51
+ ```
40
52
 
41
- ## Error Handling
53
+ **Three error layers:**
54
+
55
+ 1. **Build errors** — appear during `vercel deploy`, exit codes in build log
56
+ 2. **Runtime errors** — appear when functions are invoked, visible in function logs
57
+ 3. **Edge/routing errors** — HTTP errors from Vercel's edge network
58
+
59
+ ### Step 2: Build Errors
60
+
61
+ **`BUILD_FAILED` — Build command exited with non-zero code**
42
62
 
43
- ### Build Failed
44
- **Error Message:**
45
63
  ```
46
- Command 'npm run build' exited with 1
64
+ Error: Command "npm run build" exited with 1
47
65
  ```
48
66
 
49
- **Cause:** Build script failed due to errors in code or dependencies
67
+ - Check: `vercel.json` `buildCommand` matches your build script
68
+ - Check: all dependencies listed in `package.json` (not just devDependencies for runtime deps)
69
+ - Fix: run `npm run build` locally to reproduce
70
+
71
+ **`MISSING_BUILD_SCRIPT` — No build command found**
50
72
 
51
- **Solution:**
52
- ```bash
53
- Check build logs in Vercel dashboard. Run 'npm run build' locally to reproduce.
73
+ ```
74
+ Error: Missing Build Command
54
75
  ```
55
76
 
56
- ---
77
+ - Fix: add `"build"` to `package.json` scripts or set `buildCommand` in vercel.json
78
+ - For static sites: set `buildCommand` to empty string or `"true"`
79
+
80
+ **`FUNCTION_PAYLOAD_TOO_LARGE` — Serverless function bundle > 250 MB**
57
81
 
58
- ### Function Timeout
59
- **Error Message:**
60
82
  ```
61
- FUNCTION_INVOCATION_TIMEOUT
83
+ Error: The Serverless Function "api/heavy" is 267 MB which exceeds the maximum size of 250 MB
62
84
  ```
63
85
 
64
- **Cause:** Serverless function exceeded execution time limit
86
+ - Fix: add unused packages to `.vercelignore`, use dynamic imports, split into smaller functions
87
+ - Check: `@vercel/nft` trace output to see what is being bundled
65
88
 
66
- **Solution:**
67
- Optimize function code, use Edge Runtime, or upgrade plan for longer timeouts.
89
+ ### Step 3: Runtime Errors
68
90
 
69
- ---
91
+ **`FUNCTION_INVOCATION_FAILED` — Unhandled exception in function**
70
92
 
71
- ### Domain Verification Failed
72
- **Error Message:**
73
- ```
74
- Domain verification failed
93
+ ```bash
94
+ # View the actual error
95
+ vercel logs <deployment-url> --output=short
75
96
  ```
76
97
 
77
- **Cause:** DNS records not configured correctly
98
+ - Common causes: undefined env var, missing database connection, unhandled promise rejection
99
+ - Fix: wrap handler in try/catch, verify all env vars are set for the target environment
100
+
101
+ **`FUNCTION_INVOCATION_TIMEOUT` — Function exceeded max duration**
102
+
103
+ ```
104
+ Error: Task timed out after 10.00 seconds
105
+ ```
78
106
 
79
- **Solution:**
80
- ```typescript
81
- Add required CNAME or A records. Wait for DNS propagation (up to 48h).
107
+ - Hobby: 10s max, Pro: 60s default (up to 300s), Enterprise: 900s
108
+ - Fix: optimize database queries, add connection pooling, or move to background processing
109
+ - Configure in vercel.json:
110
+
111
+ ```json
112
+ {
113
+ "functions": {
114
+ "api/slow-endpoint.ts": {
115
+ "maxDuration": 60
116
+ }
117
+ }
118
+ }
82
119
  ```
83
120
 
84
- ## Examples
121
+ **`NO_RESPONSE_FROM_FUNCTION` — Function didn't return a response**
122
+
123
+ - Cause: handler has a code path that doesn't call `res.send()`, `res.json()`, or return a Response
124
+ - Fix: ensure ALL code paths return a response, including error handlers
125
+
126
+ **`FUNCTION_THROTTLED` — Too many concurrent function invocations**
127
+
128
+ - Hobby: 10 concurrent, Pro: 1000 concurrent
129
+ - Fix: implement client-side retry with backoff, or upgrade plan
130
+
131
+ ### Step 4: Edge/Routing Errors
132
+
133
+ **`404 NOT_FOUND`**
134
+
135
+ - API route 404: verify file is in `api/` or `pages/api/` directory
136
+ - Page 404: check `outputDirectory` in vercel.json, verify build output contains the file
137
+ - Fix: run `vercel inspect <url>` to see the deployment file listing
138
+
139
+ **`504 GATEWAY_TIMEOUT`**
140
+
141
+ - Serverless function exceeded its timeout — same as FUNCTION_INVOCATION_TIMEOUT
142
+ - Fix: increase `maxDuration` or optimize function
143
+
144
+ **`413 REQUEST_ENTITY_TOO_LARGE`**
145
+
146
+ - Request body exceeds 4.5 MB limit
147
+ - Fix: use chunked upload, stream the body, or use presigned URLs for large files
148
+
149
+ **`DEPLOYMENT_NOT_FOUND`**
150
+
151
+ - Deployment was deleted or URL is malformed
152
+ - Fix: verify the deployment still exists with `vercel ls`
153
+
154
+ ### Step 5: Environment Variable Errors
155
+
156
+ **`ReferenceError: process is not defined` (Edge Runtime)**
157
+
158
+ - Cause: using `process.env` in an edge function
159
+ - Fix: Edge Functions can read env vars but only those defined at build time. Ensure vars are set.
160
+
161
+ **Env var undefined in production but works in preview**
162
+
163
+ - Cause: variable scoped to Preview only, not Production
164
+ - Fix: check scopes in **Settings > Environment Variables**, add Production target
85
165
 
86
- ### Quick Diagnostic Commands
87
166
  ```bash
88
- # Check Vercel status
89
- curl -s https://www.vercel-status.com
167
+ # Check which environments have the variable
168
+ vercel env ls | grep DATABASE_URL
169
+ ```
90
170
 
91
- # Verify API connectivity
92
- curl -I https://api.vercel.com
171
+ ## Quick Diagnosis Flowchart
93
172
 
94
- # Check local configuration
95
- env | grep VERCEL
173
+ ```
174
+ Error occurred
175
+ ├── During build? → Check build logs, run `npm run build` locally
176
+ ├── During function invocation? → Check function logs with `vercel logs`
177
+ ├── HTTP 404? → Verify file exists in deployment: `vercel inspect`
178
+ ├── HTTP 500? → Unhandled exception in function code
179
+ ├── HTTP 504? → Function timeout — increase maxDuration
180
+ └── HTTP 429? → Rate limited — implement retry with backoff
96
181
  ```
97
182
 
98
- ### Escalation Path
99
- 1. Collect evidence with `vercel-debug-bundle`
100
- 2. Check Vercel status page
101
- 3. Contact support with request ID
183
+ ## Output
184
+
185
+ - Error layer identified (build, runtime, or edge)
186
+ - Root cause diagnosed using logs and inspection
187
+ - Fix applied and verified via new deployment
188
+ - Prevention measures documented
189
+
190
+ ## Error Handling
191
+
192
+ | Error Code | HTTP | Layer | Quick Fix |
193
+ |-----------|------|-------|-----------|
194
+ | `BUILD_FAILED` | — | Build | Run build locally, check deps |
195
+ | `FUNCTION_INVOCATION_FAILED` | 500 | Runtime | Check env vars, add try/catch |
196
+ | `FUNCTION_INVOCATION_TIMEOUT` | 504 | Runtime | Increase maxDuration in vercel.json |
197
+ | `FUNCTION_THROTTLED` | 429 | Runtime | Reduce concurrency or upgrade plan |
198
+ | `FUNCTION_PAYLOAD_TOO_LARGE` | 413 | Build | Reduce bundle size |
199
+ | `NOT_FOUND` | 404 | Edge | Verify file paths and routes |
200
+ | `EDGE_FUNCTION_INVOCATION_FAILED` | 500 | Edge | Remove Node.js APIs from edge code |
201
+ | `NO_RESPONSE_FROM_FUNCTION` | 502 | Runtime | Return response from all code paths |
102
202
 
103
203
  ## Resources
104
- - [Vercel Status Page](https://www.vercel-status.com)
105
- - [Vercel Support](https://vercel.com/docs/support)
204
+
106
205
  - [Vercel Error Codes](https://vercel.com/docs/errors)
206
+ - [Function Limitations](https://vercel.com/docs/functions/limitations)
207
+ - [Platform Limits](https://vercel.com/docs/limits)
208
+ - [Vercel Status Page](https://www.vercel-status.com)
209
+ - [Vercel Logs CLI](https://vercel.com/docs/cli/logs)
107
210
 
108
211
  ## Next Steps
109
- For comprehensive debugging, see `vercel-debug-bundle`.
212
+
213
+ For detailed debug bundles, see `vercel-debug-bundle`.
@@ -0,0 +1,53 @@
1
+ ## Error Handling Reference
2
+
3
+ ### Build Failed
4
+
5
+ **Error Message:**
6
+
7
+ ```
8
+ Command 'npm run build' exited with 1
9
+ ```
10
+
11
+ **Cause:** Build script failed due to errors in code or dependencies
12
+
13
+ **Solution:**
14
+
15
+ ```bash
16
+ Check build logs in Vercel dashboard. Run 'npm run build' locally to reproduce.
17
+ ```
18
+
19
+ ---
20
+
21
+ ### Function Timeout
22
+
23
+ **Error Message:**
24
+
25
+ ```
26
+ FUNCTION_INVOCATION_TIMEOUT
27
+ ```
28
+
29
+ **Cause:** Serverless function exceeded execution time limit
30
+
31
+ **Solution:**
32
+ Optimize function code, use Edge Runtime, or upgrade plan for longer timeouts.
33
+
34
+ ---
35
+
36
+ ### Domain Verification Failed
37
+
38
+ **Error Message:**
39
+
40
+ ```
41
+ Domain verification failed
42
+ ```
43
+
44
+ **Cause:** DNS records not configured correctly
45
+
46
+ **Solution:**
47
+
48
+ ```typescript
49
+ Add required CNAME or A records. Wait for DNS propagation (up to 48h).
50
+ ```
51
+
52
+ ---
53
+ *[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
@@ -0,0 +1,23 @@
1
+ ## Examples
2
+
3
+ ### Quick Diagnostic Commands
4
+
5
+ ```bash
6
+ # Check Vercel status
7
+ curl -s https://www.vercel-status.com
8
+
9
+ # Verify API connectivity
10
+ curl -I https://api.vercel.com
11
+
12
+ # Check local configuration
13
+ env | grep VERCEL
14
+ ```
15
+
16
+ ### Escalation Path
17
+
18
+ 1. Collect evidence with `vercel-debug-bundle`
19
+ 2. Check Vercel status page
20
+ 3. Contact support with request ID
21
+
22
+ ---
23
+ *[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*