Describe the bug
Using a separated React widget — ui.template: { file: './widget.tsx' } — without @frontmcp/ui installed fails at tool-call (render) time with a cryptic, monorepo-specific error: Failed to bundle FileSource "<file>": ... Ensure workspace packages are built (e.g. nx build ui). nx build ui is a frontmcp-monorepo command and is meaningless in a consumer project, so the error points nowhere. Root cause: @frontmcp/uipack's bundleFileSource (component/index.js) injects an auto-generated mount that does import { McpBridgeProvider } from '@frontmcp/ui/react'. esbuild externalizes react / react-dom / react/jsx-runtime but not @frontmcp/ui/react, so that package must resolve on disk; if @frontmcp/ui isn't installed, bundling throws.
To Reproduce
Steps to reproduce the behavior:
- Scaffold a fresh FrontMCP v1.3.0 project (no
@frontmcp/ui installed).
- Add a tool with
ui: { template: { file: './widget.tsx' }, uiType: 'react' } and create widget.tsx.
- Run
yarn dev, then call the tool from an MCP client.
- See error in server logs:
Failed to bundle FileSource ... Ensure workspace packages are built (e.g. nx build ui).
Expected behavior
The error should be replaced with consumer-friendly guidance: "Install @frontmcp/ui to use .tsx/.jsx widget files." A skill should document: "For .tsx/.jsx FileSource widgets, install @frontmcp/ui — it provides the React bridge mount." Ideally @frontmcp/ui would be listed as an optional peer dependency of @frontmcp/uipack / @frontmcp/sdk so the requirement surfaces at install time.
Screenshots
N/A.
Desktop (please complete the following information):
- OS: macOS (Darwin 25.3.0)
- Browser: N/A (server-side bundling failure)
- Version:
@frontmcp/sdk@1.3.0, @frontmcp/uipack@1.3.0; Node 22+
Smartphone (please complete the following information):
Additional context
Fix that worked: yarn add @frontmcp/ui (matching version 1.3.0). react / react-dom stay external and load from the CDN at runtime — only @frontmcp/ui needs to be present for server-side bundling.
Describe the bug
Using a separated React widget —
ui.template: { file: './widget.tsx' }— without@frontmcp/uiinstalled fails at tool-call (render) time with a cryptic, monorepo-specific error:Failed to bundle FileSource "<file>": ... Ensure workspace packages are built (e.g. nx build ui).nx build uiis a frontmcp-monorepo command and is meaningless in a consumer project, so the error points nowhere. Root cause:@frontmcp/uipack'sbundleFileSource(component/index.js) injects an auto-generated mount that doesimport { McpBridgeProvider } from '@frontmcp/ui/react'. esbuild externalizesreact/react-dom/react/jsx-runtimebut not@frontmcp/ui/react, so that package must resolve on disk; if@frontmcp/uiisn't installed, bundling throws.To Reproduce
Steps to reproduce the behavior:
@frontmcp/uiinstalled).ui: { template: { file: './widget.tsx' }, uiType: 'react' }and createwidget.tsx.yarn dev, then call the tool from an MCP client.Failed to bundle FileSource ... Ensure workspace packages are built (e.g. nx build ui).Expected behavior
The error should be replaced with consumer-friendly guidance: "Install
@frontmcp/uito use.tsx/.jsxwidget files." A skill should document: "For.tsx/.jsxFileSource widgets, install@frontmcp/ui— it provides the React bridge mount." Ideally@frontmcp/uiwould be listed as an optional peer dependency of@frontmcp/uipack/@frontmcp/sdkso the requirement surfaces at install time.Screenshots
N/A.
Desktop (please complete the following information):
@frontmcp/sdk@1.3.0,@frontmcp/uipack@1.3.0; Node 22+Smartphone (please complete the following information):
Additional context
Fix that worked:
yarn add @frontmcp/ui(matching version 1.3.0).react/react-domstay external and load from the CDN at runtime — only@frontmcp/uineeds to be present for server-side bundling.