Skip to content

Failed tsc types with full check #1531

@itsjamie

Description

@itsjamie

Before submitting an issue, please:

Environment Information

Please provide the following information to help us reproduce and resolve your issue:

Stagehand:

  • Language/SDK: TypeScript
  • Stagehand version: 3.0.7

AI Provider:

  • Provider: OpenAI
  • Model: gpt-5-mini

Issue Description

Building the repo under a tsconfig with NodeNext module resolution and tsc -noEmit causes the stagehand package to look for and attempt to resolve ai/dist in it's index.d.ts.

However, ai/dist is not something that is exported from the ai packages exports. So it fails.

Tsconfig:

"compilerOptions": {
    "noEmit": true,
    "target": "esnext",
    "module": "nodenext",
    "rewriteRelativeImportExtensions": true,
    "erasableSyntaxOnly": true,
    "verbatimModuleSyntax": true
  }

Current ai package exports.

"version": "5.0.117",
"exports": {
    "./package.json": "./package.json",
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/index.mjs",
      "require": "./dist/index.js"
    },
    "./internal": {
      "types": "./dist/internal/index.d.ts",
      "import": "./dist/internal/index.mjs",
      "module": "./dist/internal/index.mjs",
      "require": "./dist/internal/index.js"
    },
    "./test": {
      "types": "./dist/test/index.d.ts",
      "import": "./dist/test/index.mjs",
      "module": "./dist/test/index.mjs",
      "require": "./dist/test/index.js"
    }
  },

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