From 63d8d63f48367d4273db38597afb03ac6a31c395 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Wed, 28 Jan 2026 01:02:50 +0000 Subject: [PATCH] fix(blog): avoid barrel import in client component to fix build The blog-analytics.tsx client component was importing from the @/lib/blog barrel export, which transitively included content.ts that uses the Node.js fs module. This caused the build to fail with "Module not found: Cannot resolve fs" error. Changed imports to use direct file paths: - Import BlogPost type from @/lib/blog/types - Import analytics functions from @/lib/blog/analytics This avoids pulling content.ts into the client bundle. --- apps/web-roo-code/src/components/blog/blog-analytics.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/web-roo-code/src/components/blog/blog-analytics.tsx b/apps/web-roo-code/src/components/blog/blog-analytics.tsx index 026a9a3816..7fc1f23066 100644 --- a/apps/web-roo-code/src/components/blog/blog-analytics.tsx +++ b/apps/web-roo-code/src/components/blog/blog-analytics.tsx @@ -1,8 +1,13 @@ "use client" import { useEffect, useRef } from "react" -import type { BlogPost } from "@/lib/blog" -import { trackBlogIndexView, trackBlogPostView, trackBlogPostScrollDepth, trackBlogPostTimeSpent } from "@/lib/blog" +import type { BlogPost } from "@/lib/blog/types" +import { + trackBlogIndexView, + trackBlogPostView, + trackBlogPostScrollDepth, + trackBlogPostTimeSpent, +} from "@/lib/blog/analytics" interface BlogIndexAnalyticsProps { postCount: number