Skip to content

Zod Registry Error #1651

@jonbeckman

Description

@jonbeckman

Environment Information

Stagehand:

  • Language/SDK: TypeScript
  • Stagehand version: 3.0.8

AI Provider:

N/A

Issue Description

I am getting the following error after the first call to my API endpoint

Error: ID LocalBrowserLaunchOptions already exists in the registry
web-app:dev: > 1 | import { Stagehand } from "@browserbasehq/stagehand"
web-app:dev:     | ^

The issue extends from the Zod package, reported here colinhacks/zod#5481 (comment). Though it has since been fixed in Zod v4.3.0.

Steps to Reproduce

  1. NextJS app with ElysiaJS as API backend
  2. Call API endpoint that imports Stagehand and observe it works successfully
  3. Call the same API endpoint again and observer the Error: ID LocalBrowserLaunchOptions already exists in the registry error.

Minimal Reproduction Code

I do not have one.

Error Messages / Log trace

Error: ID LocalBrowserLaunchOptions already exists in the registry
web-app:dev: > 1 | import { Stagehand } from "@browserbasehq/stagehand"
web-app:dev:     | ^

Screenshots / Videos

I do not have any.

Related Issues

Are there any related issues or PRs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions