fix: add @composio/core to serverExternalPackages to fix dashboard 500#886
Open
fireddd wants to merge 1 commit intoComposioHQ:mainfrom
Open
fix: add @composio/core to serverExternalPackages to fix dashboard 500#886fireddd wants to merge 1 commit intoComposioHQ:mainfrom
fireddd wants to merge 1 commit intoComposioHQ:mainfrom
Conversation
tracker-linear dynamically imports @composio/core (Composio SDK), an optional dependency that isn't installed. Webpack tried to bundle it at build time, causing __webpack_require__.C is not a function and breaking all server-side rendering with a 500 Internal Server Error. Adding it to serverExternalPackages tells Next.js to leave the import as a runtime require instead of bundling it. The plugin already handles the "not installed" case gracefully at runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tracker-lineardynamically imports@composio/core(Composio SDK) as an optional dependency for the Composio transport pathtracker-linearis listed in Next.jstranspilePackages, the bundler tries to resolve the import at build time and fails when the SDK isn't installed, causing__webpack_require__.C is not a functionand a 500 Internal Server Error on every page@composio/coretoserverExternalPackagesso Next.js skips bundling it and leaves it as a runtimerequire(), matching the plugin's optional usageThe plugin already handles the missing SDK gracefully at runtime — if
COMPOSIO_API_KEYis not set, the Composio transport is never used. If it is set but the SDK isn't installed, a clear error message is thrown telling the user to install it.Closes #866
Supersedes #868 (identical fix)
Test plan
pnpm --filter @composio/ao-web buildsucceeds without@composio/coremodule errorspnpm devstarts without the reported error — Next.js ready with no module resolution failureshttp://localhost:3000returns 200 (was returning 500 before the fix)/api/sessions/*) return valid responses (were returning 500)🤖 Generated with Claude Code