Skip to content

fix: add missing dotenv/config import to CUA server template#988

Open
mxngjxa wants to merge 1 commit intoPrimeIntellect-ai:mainfrom
mxngjxa:fix/cua-dotenv-import
Open

fix: add missing dotenv/config import to CUA server template#988
mxngjxa wants to merge 1 commit intoPrimeIntellect-ai:mainfrom
mxngjxa:fix/cua-dotenv-import

Conversation

@mxngjxa
Copy link

@mxngjxa mxngjxa commented Mar 5, 2026

Summary

  • Add import "dotenv/config" to assets/templates/browserbase/cua/index.ts
  • dotenv is listed as a dependency in package.json but was never imported, causing .env files to be silently ignored
  • This led to modelApiKey is required errors from Stagehand when users set OPENAI_API_KEY in .env

Test plan

  • Verify CUA server picks up env vars from .env file after this change

🤖 Generated with Claude Code


Note

Low Risk
Single-line change to a template entrypoint to enable .env loading; low risk aside from potential env var precedence differences when .env is present.

Overview
Ensures the CUA server template loads environment variables from local .env files by adding import "dotenv/config" to assets/templates/browserbase/cua/index.ts before reading process.env (e.g., CUA_SERVER_PORT, CUA_SERVER_HOST). This prevents template users from having .env values silently ignored at startup.

Written by Cursor Bugbot for commit 89c83a2. This will update automatically on new commits. Configure here.

dotenv is listed as a dependency in package.json but was never imported,
causing .env files to be silently ignored. This led to "modelApiKey is
required" errors from Stagehand when users set OPENAI_API_KEY in .env.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant