[GH-ISSUE #205] Missing exports in published @opentui/core@0.1.25 package #817

Closed
opened 2026-03-14 08:40:18 +03:00 by kerem · 2 comments
Owner

Originally created by @thefinalb055 on GitHub (Oct 8, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/205

Summary

The published npm package @opentui/core@0.1.25 is missing several critical renderables that are present in the source code, causing runtime errors when using the package outside of the monorepo workspace.

Missing Exports

The following renderables are missing from the published package:

  1. CodeRenderable - Completely missing (no .d.ts file exists)
  2. SliderRenderable - Type definitions exist but not exported from renderables/index.d.ts
  3. TextBufferRenderable - Referenced in source but missing from published package

Error

When running code that imports these missing renderables:

❯ bun run examples/components/animation-demo.tsx
1 | (function (entry, fetcher)
              ^
SyntaxError: Export named 'CodeRenderable' not found in module '/Users/abuusama/repos/opentui/node_modules/@opentui/core/index.js'.
      at loadAndEvaluateModule (1:11)
      at link (1:11)
      at link (1:11)
      at link (1:11)
      at linkAndEvaluateModule (1:11)
      at loadAndEvaluateModule (2:1)
      at processTicksAndRejections (7:39)

Bun v1.2.23 (macOS arm64)

Steps to Reproduce

  1. Create a standalone project outside the OpenTUI monorepo
  2. Install the published package: npm install @opentui/core@0.1.25
  3. Try to import any of the missing renderables:
    import { CodeRenderable } from "@opentui/core"
    
  4. Run the code - you'll get a module export error

Detailed Reproduction Steps

Starting from the OpenTUI monorepo:

  1. Extract the packages/solid directory to a standalone location
  2. Modify package.json to change @opentui/core from workspace dependency to published version:
    "dependencies": {
      "@opentui/core": "0.1.25"
    }
    
  3. Run bun install to get the published package from npm
  4. Try to run any example that uses these renderables:
    bun run examples/components/animation-demo.tsx
    

Expected Behavior

All renderables that exist in the source code should be:

  1. Built and included in the published package
  2. Properly exported from the package's entry points
  3. Have corresponding TypeScript type definitions

Actual Behavior

In the source code (git history):

// packages/core/src/renderables/index.ts
export * from "./Box"
export * from "./Code"        // ✓ Present in source
export * from "./Slider"      // ✓ Present in source
export * from "./FrameBuffer"
export * from "./TextBufferRenderable"  // ✓ Present in source
// ... etc

In the published package:

// node_modules/@opentui/core/renderables/index.d.ts
export * from "./Box";
export * from "./FrameBuffer";
export * from "./Text";
export * from "./TextNode";
export * from "./ASCIIFont";
export * from "./Input";
export * from "./Select";
export * from "./TabSelect";
export * from "./ScrollBox";
export * from "./ScrollBar";
export * from "./composition/constructs";
export * from "./composition/vnode";
export * from "./composition/VRenderable";

// ❌ Missing: Code, Slider, TextBufferRenderable

Files in published package:

node_modules/@opentui/core/renderables/
├── ASCIIFont.d.ts
├── Box.d.ts
├── FrameBuffer.d.ts
├── Input.d.ts
├── ScrollBar.d.ts
├── ScrollBox.d.ts
├── Select.d.ts
├── Slider.d.ts        ← Exists but not exported!
├── TabSelect.d.ts
├── Text.d.ts
├── TextNode.d.ts
└── index.d.ts

❌ Missing: Code.d.ts, TextBufferRenderable.d.ts

Impact

This breaks any code outside the monorepo that tries to use:

  • CodeRenderable and CodeOptions (for syntax-highlighted code display)
  • SliderRenderable and SliderOptions (for slider components)
  • TextBufferRenderable (for text buffer rendering)

The @opentui/solid package directly imports these:

// packages/solid/src/elements/index.ts
import {
  CodeRenderable,     // ❌ Not found
  SliderRenderable,   // ❌ Not found
  // ... other imports
} from "@opentui/core"

Environment

  • Package version: @opentui/core@0.1.25
  • Published date: September 30, 2025 (Tue Sep 30 12:54:35 2025)
  • Runtime: Bun v1.2.23 (also affects Node.js)
  • OS: macOS (but affects all platforms)

Possible Cause

This appears to be a build configuration issue where:

  1. The source files exist and are committed to the repository
  2. The build process is not including them in the published package, OR
  3. The renderables index is not being updated to export them

Suggested Fix

  1. Ensure Code.ts, Slider.ts, and TextBufferRenderable.ts are built and included in the package
  2. Update packages/core/src/renderables/index.ts to export all renderables:
    export * from "./Code"
    export * from "./Slider"
    export * from "./TextBufferRenderable"
    
  3. Verify the build script includes all renderables
  4. Publish a patch release with the missing exports

Workaround

Currently, the only workaround is to use the workspace version from the monorepo, which is not viable for external projects.

  • Source: packages/core/src/renderables/index.ts
  • Types used in: packages/solid/src/elements/index.ts
  • Types used in: packages/solid/src/types/elements.ts
Originally created by @thefinalb055 on GitHub (Oct 8, 2025). Original GitHub issue: https://github.com/anomalyco/opentui/issues/205 ## Summary The published npm package `@opentui/core@0.1.25` is missing several critical renderables that are present in the source code, causing runtime errors when using the package outside of the monorepo workspace. ## Missing Exports The following renderables are missing from the published package: 1. **`CodeRenderable`** - Completely missing (no `.d.ts` file exists) 2. **`SliderRenderable`** - Type definitions exist but not exported from `renderables/index.d.ts` 3. **`TextBufferRenderable`** - Referenced in source but missing from published package ## Error When running code that imports these missing renderables: ```bash ❯ bun run examples/components/animation-demo.tsx 1 | (function (entry, fetcher) ^ SyntaxError: Export named 'CodeRenderable' not found in module '/Users/abuusama/repos/opentui/node_modules/@opentui/core/index.js'. at loadAndEvaluateModule (1:11) at link (1:11) at link (1:11) at link (1:11) at linkAndEvaluateModule (1:11) at loadAndEvaluateModule (2:1) at processTicksAndRejections (7:39) Bun v1.2.23 (macOS arm64) ``` ## Steps to Reproduce 1. **Create a standalone project** outside the OpenTUI monorepo 2. **Install the published package**: `npm install @opentui/core@0.1.25` 3. **Try to import any of the missing renderables**: ```typescript import { CodeRenderable } from "@opentui/core" ``` 4. **Run the code** - you'll get a module export error ### Detailed Reproduction Steps Starting from the OpenTUI monorepo: 1. Extract the `packages/solid` directory to a standalone location 2. Modify `package.json` to change `@opentui/core` from workspace dependency to published version: ```json "dependencies": { "@opentui/core": "0.1.25" } ``` 3. Run `bun install` to get the published package from npm 4. Try to run any example that uses these renderables: ```bash bun run examples/components/animation-demo.tsx ``` ## Expected Behavior All renderables that exist in the source code should be: 1. Built and included in the published package 2. Properly exported from the package's entry points 3. Have corresponding TypeScript type definitions ## Actual Behavior ### In the source code (git history): ```typescript // packages/core/src/renderables/index.ts export * from "./Box" export * from "./Code" // ✓ Present in source export * from "./Slider" // ✓ Present in source export * from "./FrameBuffer" export * from "./TextBufferRenderable" // ✓ Present in source // ... etc ``` ### In the published package: ```typescript // node_modules/@opentui/core/renderables/index.d.ts export * from "./Box"; export * from "./FrameBuffer"; export * from "./Text"; export * from "./TextNode"; export * from "./ASCIIFont"; export * from "./Input"; export * from "./Select"; export * from "./TabSelect"; export * from "./ScrollBox"; export * from "./ScrollBar"; export * from "./composition/constructs"; export * from "./composition/vnode"; export * from "./composition/VRenderable"; // ❌ Missing: Code, Slider, TextBufferRenderable ``` ### Files in published package: ``` node_modules/@opentui/core/renderables/ ├── ASCIIFont.d.ts ├── Box.d.ts ├── FrameBuffer.d.ts ├── Input.d.ts ├── ScrollBar.d.ts ├── ScrollBox.d.ts ├── Select.d.ts ├── Slider.d.ts ← Exists but not exported! ├── TabSelect.d.ts ├── Text.d.ts ├── TextNode.d.ts └── index.d.ts ❌ Missing: Code.d.ts, TextBufferRenderable.d.ts ``` ## Impact This breaks **any code outside the monorepo** that tries to use: - `CodeRenderable` and `CodeOptions` (for syntax-highlighted code display) - `SliderRenderable` and `SliderOptions` (for slider components) - `TextBufferRenderable` (for text buffer rendering) The `@opentui/solid` package directly imports these: ```typescript // packages/solid/src/elements/index.ts import { CodeRenderable, // ❌ Not found SliderRenderable, // ❌ Not found // ... other imports } from "@opentui/core" ``` ## Environment - **Package version**: `@opentui/core@0.1.25` - **Published date**: September 30, 2025 (Tue Sep 30 12:54:35 2025) - **Runtime**: Bun v1.2.23 (also affects Node.js) - **OS**: macOS (but affects all platforms) ## Possible Cause This appears to be a **build configuration issue** where: 1. The source files exist and are committed to the repository 2. The build process is not including them in the published package, OR 3. The renderables index is not being updated to export them ## Suggested Fix 1. Ensure `Code.ts`, `Slider.ts`, and `TextBufferRenderable.ts` are built and included in the package 2. Update `packages/core/src/renderables/index.ts` to export all renderables: ```typescript export * from "./Code" export * from "./Slider" export * from "./TextBufferRenderable" ``` 3. Verify the build script includes all renderables 4. Publish a patch release with the missing exports ## Workaround Currently, the only workaround is to use the workspace version from the monorepo, which is not viable for external projects. ## Related Files - Source: `packages/core/src/renderables/index.ts` - Types used in: `packages/solid/src/elements/index.ts` - Types used in: `packages/solid/src/types/elements.ts`
kerem closed this issue 2026-03-14 08:40:24 +03:00
Author
Owner

@kommander commented on GitHub (Oct 8, 2025):

The CodeRenderable is not in 0.1.25 yet, it came in after. You can use a snapshot release from https://www.npmjs.com/package/@opentui/core?activeTab=versions, like 0.0.0-20251006-283f60d7 that should include it.

<!-- gh-comment-id:3383024974 --> @kommander commented on GitHub (Oct 8, 2025): The `CodeRenderable` is not in `0.1.25` yet, it came in after. You can use a snapshot release from https://www.npmjs.com/package/@opentui/core?activeTab=versions, like [0.0.0-20251006-283f60d7](https://www.npmjs.com/package/@opentui/core/v/0.0.0-20251006-283f60d7) that should include it.
Author
Owner

@kommander commented on GitHub (Oct 8, 2025):

Should be available with version 0.1.26 now.

<!-- gh-comment-id:3383134072 --> @kommander commented on GitHub (Oct 8, 2025): Should be available with version `0.1.26` now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#817
No description provided.