Skip to content

fix: add @composio/core to serverExternalPackages to fix dashboard 500#886

Open
fireddd wants to merge 1 commit intoComposioHQ:mainfrom
fireddd:fix/web-tracker-linear-bundling
Open

fix: add @composio/core to serverExternalPackages to fix dashboard 500#886
fireddd wants to merge 1 commit intoComposioHQ:mainfrom
fireddd:fix/web-tracker-linear-bundling

Conversation

@fireddd
Copy link
Copy Markdown

@fireddd fireddd commented Apr 2, 2026

Summary

  • tracker-linear dynamically imports @composio/core (Composio SDK) as an optional dependency for the Composio transport path
  • Since tracker-linear is listed in Next.js transpilePackages, 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 function and a 500 Internal Server Error on every page
  • Add @composio/core to serverExternalPackages so Next.js skips bundling it and leaves it as a runtime require(), matching the plugin's optional usage

The plugin already handles the missing SDK gracefully at runtime — if COMPOSIO_API_KEY is 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 build succeeds without @composio/core module errors
  • pnpm dev starts without the reported error — Next.js ready with no module resolution failures
  • http://localhost:3000 returns 200 (was returning 500 before the fix)
  • API routes (/api/sessions/*) return valid responses (were returning 500)

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tracker-linear: module not found for @composio/core

1 participant