Skip to content

Conversation

@sandipwane
Copy link
Contributor

@sandipwane sandipwane commented Dec 26, 2025

Why

When running typecheck in a bun/npm workspace monorepo, it failed with:

error TS2307: Cannot find module '../node_modules/@opentui/solid/scripts/solid-plugin' 
or its corresponding type declarations.

Summary

  • Changed ../node_modules/@opentui/solid/scripts/solid-plugin@opentui/solid/bun-plugin
  • Fixes module resolution in monorepo setups where dependencies are hoisted

Problem

The hardcoded relative path breaks when:

# Expected (single repo)
packages/opencode/node_modules/@opentui/solid/  ✓

# Actual (monorepo with hoisting)
packages/opencode/node_modules/@opentui/solid/  ✗ (doesn't exist)
node_modules/@opentui/solid/                     ✓ (hoisted here)

Solution

Use the proper package export which @opentui/solid already provides:

"exports": {
  "./bun-plugin": {
    "types": "./scripts/solid-plugin.d.ts",
    "import": "./scripts/solid-plugin.ts"
  }
}

Test Plan

  • Verified package exports ./bun-plugin
  • Tested in monorepo environment

The hardcoded relative path `../node_modules/@opentui/solid/scripts/solid-plugin`
breaks in monorepo setups where dependencies are hoisted to root node_modules.

Using the proper package export `@opentui/solid/bun-plugin` works in all environments.
@sandipwane sandipwane changed the title fix: use package export for solid plugin import fix: use package export for @opentui/solid to support monorepos Dec 26, 2025
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