:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(mcp): pin react resolution for vite 7 ui-apps build (#63522)
Robbie29518f501b5b
diff --git a/.github/workflows/ci-mcp-ui-apps.yml b/.github/workflows/ci-mcp-ui-apps.ymlindex 2aaf643fff6b..538720dbc16c 100644--- a/.github/workflows/ci-mcp-ui-apps.yml+++ b/.github/workflows/ci-mcp-ui-apps.yml@@ -76,7 +76,8 @@ jobs:token: ${{ github.token }}- name: Install dependencies- run: pnpm --filter=@posthog/mcp... --filter='./products/*' install --frozen-lockfile+ # Match services/mcp/Dockerfile exactly+ run: pnpm --filter=@posthog/mcp... install --frozen-lockfile- name: Check generated UI apps are up to daterun: |diff --git a/services/mcp/vite.ui-apps.config.ts b/services/mcp/vite.ui-apps.config.tsindex 0921abcd3b3b..4005a804eaee 100644--- a/services/mcp/vite.ui-apps.config.ts+++ b/services/mcp/vite.ui-apps.config.ts@@ -58,10 +58,14 @@ export default defineConfig({find: /^@posthog\/quill-charts$/,replacement: resolve(__dirname, '../../packages/quill/packages/charts/src/index.ts'),},- // lucide-react isn't a workspace dep at the products/ level, so files- // resolved via the `products` alias can't find it. Pin to this- // package's installed copy (matches the version Quill expects).+ // lucide-react, react, and react-dom aren't reachable from files+ // resolved via the `products` alias (products/ isn't a dep of this+ // package), so pin them to this package's copies. react needs its+ // subpaths covered too: Vite 7 resolves the injected react/jsx-runtime+ // import relative to the importing file.{ find: /^lucide-react$/, replacement: resolve(__dirname, 'node_modules/lucide-react') },+ { find: 'react', replacement: resolve(__dirname, 'node_modules/react') },+ { find: 'react-dom', replacement: resolve(__dirname, 'node_modules/react-dom') },{ find: '@common', replacement: resolve(__dirname, '../../common') },],},