[GH-ISSUE #290] Dev server fails: Missing Clerk publishable key and CopilotSidebar export errors #543

Closed
opened 2026-03-13 20:50:31 +03:00 by kerem · 1 comment
Owner

Originally created by @uniqueumesh on GitHub (Oct 12, 2025).
Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/290

Summary
Launching the frontend (Create React App) shows a blocking overlay “Missing Clerk Publishable Key — Please add REACT_APP_CLERK_PUBLISHABLE_KEY to your .env file” and compile errors reporting that CopilotSidebar is not exported from @copilotkit/react-ui.

Screenshot
Please see the attached screenshot from local run (missing Clerk banner + multiple CopilotSidebar export errors).

Steps to Reproduce

  1. Windows PowerShell
  2. cd frontend && npm install
  3. npm start
  4. Observe overlay and errors

Actual Behavior

  • CRA overlay blocks the UI with “Missing Clerk Publishable Key”
  • Webpack compilation errors for CopilotSidebar import:
    export 'CopilotSidebar' (imported as 'CopilotSidebar') was not found in '@copilotkit/react-ui' (possible exports: Button, Card)
    Affected files include:
    • src/components/BlogWriter/BlogWriter.tsx
    • src/components/ContentPlanningDashboard/components/ContentStrategyBuilder.tsx
    • src/components/FacebookWriter/FacebookWriter.tsx
    • src/components/LinkedInWriter/LinkedInWriter.tsx
    • src/components/SEODashboard/SEOCopilotKitProvider.tsx

Expected Behavior
Dev server starts and renders without blocking overlay and without missing exports.

Environment

  • OS: Windows 10 (build 26100)
  • Repo: AJaySi/ALwrity (branch: main)
  • Node/NPM: please confirm with node -v / npm -v
  • Commit: 20b0171 (from local)

Suspected Root Causes

  1. Frontend env var missing: CRA requires REACT_APP_ prefix; backend uses CLERK_PUBLISHABLE_KEY but frontend needs REACT_APP_CLERK_PUBLISHABLE_KEY.
  2. Version mismatch: Code imports CopilotSidebar but current @copilotkit/react-ui version appears not to export it (only Button, Card). Likely a removed/renamed component or incompatible version.

Proposed Fixes

  • Add a documented frontend env file (frontend/.env.local) and require:
    REACT_APP_CLERK_PUBLISHABLE_KEY=<publishable_key>
  • Align CopilotKit usage and versions:
    • Option A: Pin @copilotkit/react-ui to a version that exports CopilotSidebar and document the supported pair with @copilotkit/react-core.
    • Option B: Update our code to the latest CopilotKit API (replace CopilotSidebar with current components) and bump to compatible versions.
  • Add README onboarding for required frontend env vars and supported package versions.

Workarounds Tried

  • Creating frontend/.env.local with REACT_APP_CLERK_PUBLISHABLE_KEY=pk_test_replace_me (removes overlay once valid value is used)
  • Planning to pin/react-ui to a version exporting CopilotSidebar or refactor imports.

Request

  • Confirm the intended CopilotKit versions and whether CopilotSidebar is still part of the public API, and add/setup docs for the required frontend env vars.
Originally created by @uniqueumesh on GitHub (Oct 12, 2025). Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/290 Summary Launching the frontend (Create React App) shows a blocking overlay “Missing Clerk Publishable Key — Please add REACT_APP_CLERK_PUBLISHABLE_KEY to your .env file” and compile errors reporting that CopilotSidebar is not exported from @copilotkit/react-ui. Screenshot Please see the attached screenshot from local run (missing Clerk banner + multiple CopilotSidebar export errors). Steps to Reproduce 1) Windows PowerShell 2) cd frontend && npm install 3) npm start 4) Observe overlay and errors Actual Behavior - CRA overlay blocks the UI with “Missing Clerk Publishable Key” - Webpack compilation errors for CopilotSidebar import: export 'CopilotSidebar' (imported as 'CopilotSidebar') was not found in '@copilotkit/react-ui' (possible exports: Button, Card) Affected files include: - src/components/BlogWriter/BlogWriter.tsx - src/components/ContentPlanningDashboard/components/ContentStrategyBuilder.tsx - src/components/FacebookWriter/FacebookWriter.tsx - src/components/LinkedInWriter/LinkedInWriter.tsx - src/components/SEODashboard/SEOCopilotKitProvider.tsx Expected Behavior Dev server starts and renders without blocking overlay and without missing exports. Environment - OS: Windows 10 (build 26100) - Repo: AJaySi/ALwrity (branch: main) - Node/NPM: please confirm with `node -v` / `npm -v` - Commit: 20b0171 (from local) Suspected Root Causes 1) Frontend env var missing: CRA requires REACT_APP_ prefix; backend uses CLERK_PUBLISHABLE_KEY but frontend needs REACT_APP_CLERK_PUBLISHABLE_KEY. 2) Version mismatch: Code imports CopilotSidebar but current @copilotkit/react-ui version appears not to export it (only Button, Card). Likely a removed/renamed component or incompatible version. Proposed Fixes - Add a documented frontend env file (frontend/.env.local) and require: REACT_APP_CLERK_PUBLISHABLE_KEY=<publishable_key> - Align CopilotKit usage and versions: - Option A: Pin @copilotkit/react-ui to a version that exports CopilotSidebar and document the supported pair with @copilotkit/react-core. - Option B: Update our code to the latest CopilotKit API (replace CopilotSidebar with current components) and bump to compatible versions. - Add README onboarding for required frontend env vars and supported package versions. Workarounds Tried - Creating frontend/.env.local with REACT_APP_CLERK_PUBLISHABLE_KEY=pk_test_replace_me (removes overlay once valid value is used) - Planning to pin/react-ui to a version exporting CopilotSidebar or refactor imports. Request - Confirm the intended CopilotKit versions and whether CopilotSidebar is still part of the public API, and add/setup docs for the required frontend env vars.
kerem closed this issue 2026-03-13 20:50:36 +03:00
Author
Owner

@uniqueumesh commented on GitHub (Oct 12, 2025):

It was created by mistake.

<!-- gh-comment-id:3394966743 --> @uniqueumesh commented on GitHub (Oct 12, 2025): It was created by mistake.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#543
No description provided.