-
Notifications
You must be signed in to change notification settings - Fork 1
debug: add diagnostic logging to troubleshoot Vercel config.plugins issue #1148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,7 +11,7 @@ import { ObjectKernel } from '@objectstack/runtime'; | |||||||||||||||||||||||
| import { createHonoApp } from '@objectstack/hono'; | ||||||||||||||||||||||||
| import { getRequestListener } from '@hono/node-server'; | ||||||||||||||||||||||||
| import type { Hono } from 'hono'; | ||||||||||||||||||||||||
| import config from '../objectstack.config'; | ||||||||||||||||||||||||
| import stackConfig from '../objectstack.config'; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // --------------------------------------------------------------------------- | ||||||||||||||||||||||||
| // Singleton state — persists across warm Vercel invocations | ||||||||||||||||||||||||
|
|
@@ -38,7 +38,11 @@ async function ensureKernel(): Promise<ObjectKernel> { | |||||||||||||||||||||||
| const kernel = new ObjectKernel(); | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| // Register all plugins from shared config | ||||||||||||||||||||||||
| for (const plugin of config.plugins ?? []) { | ||||||||||||||||||||||||
| if (!stackConfig.plugins || stackConfig.plugins.length === 0) { | ||||||||||||||||||||||||
| throw new Error(`[Vercel] No plugins found in stackConfig`); | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| for (const plugin of stackConfig.plugins) { | ||||||||||||||||||||||||
|
Comment on lines
+41
to
+45
|
||||||||||||||||||||||||
| if (!stackConfig.plugins || stackConfig.plugins.length === 0) { | |
| throw new Error(`[Vercel] No plugins found in stackConfig`); | |
| } | |
| for (const plugin of stackConfig.plugins) { | |
| const plugins = stackConfig.plugins ?? (stackConfig as any).default?.plugins; | |
| if (!Array.isArray(plugins) || plugins.length === 0) { | |
| throw new Error(`[Vercel] No plugins found in stackConfig`); | |
| } | |
| for (const plugin of plugins) { |
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description mentions adding config-structure diagnostics, ESM interop fallback, and per-plugin registration logging, but the current diff only renames the import and adds a basic empty-check. Either implement the described diagnostics/fallback/logging here, or update the PR description to match what’s actually being shipped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thrown error message is very generic and doesn’t include the actual shape of the imported config, which makes the Vercel failure harder to diagnose. Include details like
typeof stackConfig,Object.keys(stackConfig ?? {}), and the detectedpluginstype/length (and whetherdefault.pluginswas present) in the error or preceding logs.