[GH-ISSUE #230] Trouble running examples in the repo #828

Open
opened 2026-03-14 08:42:51 +03:00 by kerem · 8 comments
Owner

Originally created by @pizzaisdavid on GitHub (Oct 23, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/230

I want to see the cool interactive examples include in the repo, but when I do the steps in the README, they are giving me trouble.

  1. clone the repo:
PS C:\Users\david\Desktop> git clone git@github.com:sst/opentui.git
Cloning into 'opentui'...
remote: Enumerating objects: 4597, done.
remote: Counting objects: 100% (2214/2214), done.
remote: Compressing objects: 100% (947/947), done.
remote: Total 4597 (delta 1673), reused 1269 (delta 1267), pack-reused 2383 (from 2)
Receiving objects: 100% (4597/4597), 3.59 MiB | 4.33 MiB/s, done.
Resolving deltas: 100% (3079/3079), done.
  1. do the steps in the README:
PS C:\Users\david\Desktop> cd .\opentui\
PS C:\Users\david\Desktop\opentui> bun install
bun install v1.3.1 (89fa0f34)

+ prettier@3.6.2

418 packages installed [4.47s]
PS C:\Users\david\Desktop\opentui> cd .\packages\core\
PS C:\Users\david\Desktop\opentui\packages\core> bun run .\src\examples\index.ts
error: Cannot find module '@opentui/core-win32-x64/index.ts' from 'C:\Users\david\Desktop\opentui\packages\core\src\zig.ts'

Bun v1.3.1 (Windows x64)

I have no idea if I should have zig installed to run the examples, I have already installed it (via the same command below) and restarted my computer before attempting the above.

PS C:\Users\david\Desktop\opentui\packages\core> winget install -e --id zig.zig
Found an existing package already installed. Trying to upgrade the installed package...
No available upgrade found.
No newer package versions are available from the configured sources.
PS C:\Users\david\Desktop\opentui\packages\core>

I think it might be necessary to go into packages/core and run the build command, but that also gives me an error:

PS C:\Users\david\Desktop\opentui\packages\core> bun run build
$ bun run build:native && bun run build:lib
$ bun scripts/build.ts --native
Building native prod binaries...
C:\Users\david\AppData\Local\zig\p\uucode-0.1.0-ZZjBPpAFQABNCvd9cVPBg4I7233Ays-NWfWphPNqGbyE\build.zig:164:34: error: struct 'array_list.Aligned(u8,null)' has no member named 'init'
    var bytes = std.ArrayList(u8).init(allocator);
                ~~~~~~~~~~~~~~~~~^~~~~
C:\Users\david\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.2\lib\std\array_list.zig:606:12: note: struct declared here
    return struct {
           ^~~~~~
referenced by:
    build: C:\Users\david\AppData\Local\zig\p\uucode-0.1.0-ZZjBPpAFQABNCvd9cVPBg4I7233Ays-NWfWphPNqGbyE\build.zig:98:78
    runBuild__anon_104292: C:\Users\david\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.2\lib\std\Build.zig:2214:33
    12 reference(s) hidden; use '-freference-trace=14' to see all references
C:\Users\david\AppData\Local\zig\p\zg-0.14.1-oGqU3IQ_tALZIiBN026_NTaPJqU-Upm8P_C7QED2Rzm8\build.zig:45:10: error: no field named 'root_source_file' in struct 'Build.ExecutableOptions'
        .root_source_file = b.path("codegen/gbp.zig"),
         ^~~~~~~~~~~~~~~~
C:\Users\david\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.2\lib\std\Build.zig:771:31: note: struct declared here
pub const ExecutableOptions = struct {
                              ^~~~~~
build.zig:115:10: error: no field named 'root_source_file' in struct 'Build.TestOptions'
        .root_source_file = b.path("test.zig"),
         ^~~~~~~~~~~~~~~~
C:\Users\david\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.2\lib\std\Build.zig:856:25: note: struct declared here
pub const TestOptions = struct {
                        ^~~~~~
Error: Zig build failed
error: script "build:native" exited with code 1
error: script "build" exited with code 1
PS C:\Users\david\Desktop\opentui\packages\core>
Originally created by @pizzaisdavid on GitHub (Oct 23, 2025). Original GitHub issue: https://github.com/anomalyco/opentui/issues/230 I want to see the cool interactive examples include in the repo, but when I do the steps in the README, they are giving me trouble. 1) clone the repo: ``` PS C:\Users\david\Desktop> git clone git@github.com:sst/opentui.git Cloning into 'opentui'... remote: Enumerating objects: 4597, done. remote: Counting objects: 100% (2214/2214), done. remote: Compressing objects: 100% (947/947), done. remote: Total 4597 (delta 1673), reused 1269 (delta 1267), pack-reused 2383 (from 2) Receiving objects: 100% (4597/4597), 3.59 MiB | 4.33 MiB/s, done. Resolving deltas: 100% (3079/3079), done. ``` 2) do the steps in the README: ``` PS C:\Users\david\Desktop> cd .\opentui\ PS C:\Users\david\Desktop\opentui> bun install bun install v1.3.1 (89fa0f34) + prettier@3.6.2 418 packages installed [4.47s] PS C:\Users\david\Desktop\opentui> cd .\packages\core\ PS C:\Users\david\Desktop\opentui\packages\core> bun run .\src\examples\index.ts error: Cannot find module '@opentui/core-win32-x64/index.ts' from 'C:\Users\david\Desktop\opentui\packages\core\src\zig.ts' Bun v1.3.1 (Windows x64) ``` I have no idea if I should have zig installed to run the examples, I have already installed it (via the same command below) and restarted my computer before attempting the above. ``` PS C:\Users\david\Desktop\opentui\packages\core> winget install -e --id zig.zig Found an existing package already installed. Trying to upgrade the installed package... No available upgrade found. No newer package versions are available from the configured sources. PS C:\Users\david\Desktop\opentui\packages\core> ``` I think it might be necessary to go into `packages/core` and run the build command, but that also gives me an error: ``` PS C:\Users\david\Desktop\opentui\packages\core> bun run build $ bun run build:native && bun run build:lib $ bun scripts/build.ts --native Building native prod binaries... C:\Users\david\AppData\Local\zig\p\uucode-0.1.0-ZZjBPpAFQABNCvd9cVPBg4I7233Ays-NWfWphPNqGbyE\build.zig:164:34: error: struct 'array_list.Aligned(u8,null)' has no member named 'init' var bytes = std.ArrayList(u8).init(allocator); ~~~~~~~~~~~~~~~~~^~~~~ C:\Users\david\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.2\lib\std\array_list.zig:606:12: note: struct declared here return struct { ^~~~~~ referenced by: build: C:\Users\david\AppData\Local\zig\p\uucode-0.1.0-ZZjBPpAFQABNCvd9cVPBg4I7233Ays-NWfWphPNqGbyE\build.zig:98:78 runBuild__anon_104292: C:\Users\david\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.2\lib\std\Build.zig:2214:33 12 reference(s) hidden; use '-freference-trace=14' to see all references C:\Users\david\AppData\Local\zig\p\zg-0.14.1-oGqU3IQ_tALZIiBN026_NTaPJqU-Upm8P_C7QED2Rzm8\build.zig:45:10: error: no field named 'root_source_file' in struct 'Build.ExecutableOptions' .root_source_file = b.path("codegen/gbp.zig"), ^~~~~~~~~~~~~~~~ C:\Users\david\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.2\lib\std\Build.zig:771:31: note: struct declared here pub const ExecutableOptions = struct { ^~~~~~ build.zig:115:10: error: no field named 'root_source_file' in struct 'Build.TestOptions' .root_source_file = b.path("test.zig"), ^~~~~~~~~~~~~~~~ C:\Users\david\AppData\Local\Microsoft\WinGet\Packages\zig.zig_Microsoft.Winget.Source_8wekyb3d8bbwe\zig-x86_64-windows-0.15.2\lib\std\Build.zig:856:25: note: struct declared here pub const TestOptions = struct { ^~~~~~ Error: Zig build failed error: script "build:native" exited with code 1 error: script "build" exited with code 1 PS C:\Users\david\Desktop\opentui\packages\core> ```
Author
Owner

@pizzaisdavid commented on GitHub (Oct 23, 2025):

What works for me (on Windows at least):

git clone git@github.com:sst/opentui.git
cd .\opentui\
cd .\packages\core\
bun install @opentui/core
bun run .\src\examples\index.ts
<!-- gh-comment-id:3438726348 --> @pizzaisdavid commented on GitHub (Oct 23, 2025): What works for me (on Windows at least): ``` git clone git@github.com:sst/opentui.git cd .\opentui\ cd .\packages\core\ bun install @opentui/core bun run .\src\examples\index.ts ```
Author
Owner

@pizzaisdavid commented on GitHub (Oct 23, 2025):

The core seeming to be: bun install @opentui/core

I imagine it runs bun install, and then additionally installs @opentui/core but I have no idea, I am new to bun.

Doing bun install @opentui/core in the root of the project, results in:

PS C:\Users\david\Desktop\opentui> bun install @opentui/core
bun add v1.3.1 (89fa0f34)
error: Package "@opentui/core@0.1.29" has a dependency loop
  Resolution: "@opentui/core@workspace:packages\core"
  Dependency: "@opentui/core@^0.1.29"
error: An internal error occurred (DependencyLoop)

So it has to be in the core folder I guess.

<!-- gh-comment-id:3438737183 --> @pizzaisdavid commented on GitHub (Oct 23, 2025): The core seeming to be: `bun install @opentui/core` I imagine it runs `bun install`, and then additionally installs `@opentui/core` but I have no idea, I am new to bun. Doing `bun install @opentui/core` in the root of the project, results in: ``` PS C:\Users\david\Desktop\opentui> bun install @opentui/core bun add v1.3.1 (89fa0f34) error: Package "@opentui/core@0.1.29" has a dependency loop Resolution: "@opentui/core@workspace:packages\core" Dependency: "@opentui/core@^0.1.29" error: An internal error occurred (DependencyLoop) ``` So it has to be in the core folder I guess.
Author
Owner

@pizzaisdavid commented on GitHub (Oct 23, 2025):

Not sure if I'm doing something stoooooopid or if the README should be updated.

<!-- gh-comment-id:3438740348 --> @pizzaisdavid commented on GitHub (Oct 23, 2025): Not sure if I'm doing something stoooooopid or if the README should be updated.
Author
Owner

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

No I think windows needs some more love, I haven't really tested it on windows at all tbh.

<!-- gh-comment-id:3440186575 --> @kommander commented on GitHub (Oct 24, 2025): No I think windows needs some more love, I haven't really tested it on windows at all tbh.
Author
Owner

@geril07 commented on GitHub (Oct 27, 2025):

Same error on linux, seems like it's about zig 0.15.1, as I saw root_source_file was removed in 0.15.x , which is part of the error

<!-- gh-comment-id:3452181287 --> @geril07 commented on GitHub (Oct 27, 2025): Same error on linux, seems like it's about zig 0.15.1, as I saw `root_source_file` [was removed in 0.15.x](https://ziglang.org/download/0.15.1/release-notes.html#Removed-Deprecated-Implicit-Root-Module) , which is part of the error
Author
Owner

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

Ah yeah, it's currently 0.14.1 only. Needs some migration work to go to 0.15.1

<!-- gh-comment-id:3452281856 --> @kommander commented on GitHub (Oct 27, 2025): Ah yeah, it's currently 0.14.1 only. Needs some migration work to go to 0.15.1
Author
Owner

@ch3ll0v3k commented on GitHub (Oct 30, 2025):

not working for me with bun v1.3.0 linux/debian 12

Image
<!-- gh-comment-id:3465776357 --> @ch3ll0v3k commented on GitHub (Oct 30, 2025): not working for me with bun v1.3.0 linux/debian 12 <img width="1180" height="862" alt="Image" src="https://github.com/user-attachments/assets/69b3874d-28a0-472f-a8f1-bf97fbc4ff16" />
Author
Owner

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

Needs to be built manually from main or switch to tag that supports the installed package version. Like if you run bun install and it installs v0.1.31, you need to be on that tagged commit for the source to work.

<!-- gh-comment-id:3470731578 --> @kommander commented on GitHub (Oct 30, 2025): Needs to be built manually from main or switch to tag that supports the installed package version. Like if you run bun install and it installs v0.1.31, you need to be on that tagged commit for the source to work.
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#828
No description provided.