diff --git a/apps/marketing/README.md b/apps/marketing/README.md new file mode 100644 index 000000000..87c866364 --- /dev/null +++ b/apps/marketing/README.md @@ -0,0 +1,36 @@ +# Marketing App + +## Prerequisites + +- Install monorepo dependencies from the repo root before running marketing scripts: + +```bash +bun install +``` + +## Build + +```bash +bun run build:marketing +``` + +If the build fails with: + +```text +/bin/bash: next: command not found +``` + +rerun: + +```bash +bun install +bun run build:marketing +``` + +This usually means the workspace dependencies were not yet installed for the current environment. + +If you see a build error about `CodeBlock.tsx` or `GetStarted.tsx` importing `useState`/`useEffect` in a Server Component: + +- You are likely running an older marketing checkout where those components still exist. +- Switch to the current branch in this PR (`fix-marketing-build-errors`) and rerun install/build. +- In that older snapshot, the fix is to add `"use client"` at the top of those client-only components. diff --git a/apps/marketing/components/CodeBlock.tsx b/apps/marketing/components/CodeBlock.tsx index 558a1ab42..1d7480425 100644 --- a/apps/marketing/components/CodeBlock.tsx +++ b/apps/marketing/components/CodeBlock.tsx @@ -1,3 +1,5 @@ +"use client"; + import { useState, useCallback, useRef, useEffect } from "react"; const svgProps = { @@ -31,7 +33,7 @@ interface CodeBlockProps { export function CodeBlock({ code, label }: CodeBlockProps) { const [copied, setCopied] = useState(false); - const timerRef = useRef>(null); + const timerRef = useRef | null>(null); useEffect(() => { return () => {