Skip to content

Running stagehande first time with pnpm create browser-app gives me StagehandDefaultError #641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
piyushchauhan opened this issue Apr 6, 2025 · 2 comments

Comments

@piyushchauhan
Copy link

Error

/Users/piyushchauhan/projects/personal/stagehand/iniTest/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_openai@4_2lhsw4ohb6pbikidycysjge4hy/node_modules/@browserbasehq/stagehand/dist/index.js:3174
        throw new StagehandDefaultError();
              ^

StagehandDefaultError: 
Hey! We're sorry you ran into an error. 
If you need help, please open a Github issue or reach out to us on Slack: https://stagehand.dev/slack

    at _StagehandPage.<anonymous> (/Users/piyushchauhan/projects/personal/stagehand/iniTest/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_openai@4_2lhsw4ohb6pbikidycysjge4hy/node_modules/@browserbasehq/stagehand/dist/index.js:3174:15)
    at Generator.throw (<anonymous>)
    at rejected (/Users/piyushchauhan/projects/personal/stagehand/iniTest/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_openai@4_2lhsw4ohb6pbikidycysjge4hy/node_modules/@browserbasehq/stagehand/dist/index.js:70:29)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

Node.js v23.7.0
 ELIFECYCLE  Command failed with exit code 1.

How did I reach this error?

pnpm create browser-app
(node:29567) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
.../1960a45f2c2-737f                     | +158 ++++++++++++++++
.../1960a45f2c2-737f                     | Progress: resolved 158, reused 42, downloaded 116, added 158, done
✔ Enter a name for your project iniTest
✔ Would you like to start with a quickstart example? Yes
✔ Select AI model (API key required) OpenAI GPT-4o mini
✔ Enter your OpenAI API key (https://platform.openai.com/api-keys)
✔ Are you using Cursor or Windsurf? Cursor
✔ Run locally or on Browserbase (60 minutes free)? Local
Creating new browser app...
Cloning template from the Browserbase Stagehand Scaffold: https://github.com./browserbase/stagehand-scaffold (branch: anirudh/update-2.0)
(node:29660) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
Wrote environment variables to /Users/piyushchauhan/projects/personal/stagehand/iniTest/.env. Existing environment variables were taken from your environment.
Formatting code with Prettier...
@dillonstreator
Copy link

I ran into the same issue when providing an invalid API key

@kamath
Copy link
Member

kamath commented Apr 9, 2025

Yeah, have you validated that your API key for your LLM is a valid one? We should patch this error

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

No branches or pull requests

3 participants