Skip to content

Conversation

@Julianb233
Copy link

Summary

  • Added disablePino: true to Stagehand constructor to prevent pino-pretty transport errors in production/serverless environments
  • The pino-pretty module cannot be loaded in bundled deployments (Vercel, etc.) causing: Error: unable to determine transport target for "pino-pretty"

Test plan

  • TypeScript compiles successfully
  • Fix verified in compiled output (dist/sessionManager.js)
  • End-to-end test passed with real Browserbase sessions
  • Logging still works via custom console.error logger

🤖 Generated with Claude Code

The pino-pretty transport cannot be loaded in serverless/bundled
production environments (like Vercel), causing the error:
"unable to determine transport target for pino-pretty"

This fix adds `disablePino: true` to the Stagehand constructor,
which bypasses pino initialization entirely and uses only the
custom console.error logger.

Tested end-to-end with real Browserbase sessions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 11, 2025

Greptile Overview

Greptile Summary

This PR fixes a production deployment issue in the Browserbase MCP server by disabling pino logging in the Stagehand constructor. The change adds disablePino: true to prevent "unable to determine transport target for 'pino-pretty'" errors that occur in serverless and bundled deployment environments like Vercel. The pino-pretty module is not available in these contexts, causing the application to fail at runtime. The fix maintains logging functionality through the existing custom console.error logger, ensuring the server remains functional in production deployments while resolving the pino-pretty transport error.

Important Files Changed

Filename Score Overview
src/sessionManager.ts 5/5 Added disablePino: true to Stagehand constructor to prevent pino-pretty errors in production

Confidence score: 5/5

  • This PR is safe to merge with minimal risk as it addresses a specific production deployment issue
  • Score reflects a targeted fix for a known compatibility problem with clear documentation and testing
  • No files require special attention as the change is minimal and well-documented

Sequence Diagram

sequenceDiagram
    participant User
    participant SessionManager
    participant createStagehandInstance
    participant Stagehand
    participant BrowserbaseAPI
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

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