[GH-ISSUE #11] Errors when building #772

Closed
opened 2026-03-14 08:28:49 +03:00 by kerem · 3 comments
Owner

Originally created by @aaronshaf on GitHub (Aug 13, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/11

ompat@0.17.3
+ @opentui/core-darwin-arm64@0.1.1
+ bun-webgpu@0.1.0
+ planck@1.4.2
+ three@0.177.0
+ @types/bun@1.2.19
+ @types/three@0.177.0
+ commander@13.1.0
+ prettier@3.6.2
+ jimp@1.6.0
+ yoga-layout@3.2.1

92 packages installed [121.00ms]

 …/opentui   main  bun run build
$ bun run build:native && bun run build:lib
$ node scripts/build.mjs --native
Building native prod binaries...
Built: @opentui/core-darwin-x64
Built: @opentui/core-darwin-arm64
Built: @opentui/core-linux-x64
Built: @opentui/core-linux-arm64
Built: @opentui/core-win32-x64
Built: @opentui/core-win32-arm64
$ node scripts/build.mjs --lib
Building library...
Bundled 39 modules in 9ms

  index.js  0.44 MB  (entry point)

Bundled 238 modules in 44ms

  3d.js                        1.39 MB  (entry point)
  supersampling-jw3fem06.wgsl  6.66 KB  (asset)

Generating TypeScript declarations...
node_modules/bun-webgpu/src/ffi.ts:8:33 - error TS2345: Argument of type 'URL' is not assignable to parameter of type 'string | URL'.
  Type 'URL' is not assignable to type 'import("url").URL'.
    Types of property 'searchParams' are incompatible.
      Type 'URLSearchParams' is missing the following properties from type 'URLSearchParams': entries, keys, values, [Symbol.iterator]

8 const __dirname = fileURLToPath(new URL(".", import.meta.url));
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/bun-webgpu/src/GPUAdapter.ts:279:68 - error TS2345: Argument of type 'GPUDeviceDescriptor & { uncapturedErrorCallbackInfo: WGPUUncapturedErrorCallbackInfo; deviceLostCallbackInfo: { mode: "
  Types of property 'requiredFeatures' are incompatible.
    Type 'Iterable<GPUFeatureName> | undefined' is not assignable to type 'Iterable<"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc" | "texture-
      Type 'Iterable<GPUFeatureName>' is not assignable to type 'Iterable<"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc" | "texture-compressio
        The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
          Type 'IteratorResult<GPUFeatureName, any>' is not assignable to type 'IteratorResult<"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc"
            Type 'IteratorYieldResult<GPUFeatureName>' is not assignable to type 'IteratorResult<"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc
              Type 'IteratorYieldResult<GPUFeatureName>' is not assignable to type 'IteratorYieldResult<"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compres
                Type 'GPUFeatureName' is not assignable to type '"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc" | "texture-compression-bc-slic
                  Type '"texture-formats-tier1"' is not assignable to type '"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc" | "texture-compress

279                 const descBuffer = WGPUDeviceDescriptorStruct.pack(fullDescriptor, {
                                                                       ~~~~~~~~~~~~~~

node_modules/bun-webgpu/src/GPUCommandEncoder.ts:36:13 - error TS2322: Type 'GPURenderPassColorAttachment[]' is not assignable to type 'Iterable<{ view: GPUTextureView | null; loadOp: "undefined" | "cle
  The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types.
    Type 'IteratorResult<GPURenderPassColorAttachment, undefined>' is not assignable to type 'IteratorResult<{ view: GPUTextureView | null; loadOp: "undefined" | "clear" | "load" | "expand-resolve-textu
      Type 'IteratorYieldResult<GPURenderPassColorAttachment>' is not assignable to type 'IteratorResult<{ view: GPUTextureView | null; loadOp: "undefined" | "clear" | "load" | "expand-resolve-texture"; storeOp: "undefined" | "store" | "discard"; nextInChain?: number | ... 2 more ... | undefined; depthSlice?: number | ... 1 more ... | undefined; resolveTarget?: GPUTextureView | ... 1 more ... | undefined...'.
        Type 'IteratorYieldResult<GPURenderPassColorAttachment>' is not assignable to type 'IteratorYieldResult<{ view: GPUTextureView | null; loadOp: "undefined" | "clear" | "load" | "expand-resolve-texture"; storeOp: "undefined" | "store" | "discard"; nextInChain?: number | ... 2 more ... | undefined; depthSlice?: number | ... 1 more ... | undefined; resolveTarget?: GPUTextureView | ... 1 more ... | unde...'.
          Type 'GPURenderPassColorAttachment' is not assignable to type '{ view: GPUTextureView | null; loadOp: "undefined" | "clear" | "load" | "expand-resolve-texture"; storeOp: "undefined" | "store" | "discard"; nextInChain?: number | bigint | null | undefined; depthSlice?: number | ... 1 more ... | undefined; resolveTarget?: GPUTextureView | ... 1 more ... | undefined; clearValue?: {...'.
            Types of property 'view' are incompatible.
              Type 'GPUTextureView | GPUTexture' is not assignable to type 'GPUTextureView | null'.
                Type 'GPUTexture' is not assignable to type 'GPUTextureView'.
                  Types of property '__brand' are incompatible.
                    Type '"GPUTexture"' is not assignable to type '"GPUTextureView"'.

36             colorAttachments
               ~~~~~~~~~~~~~~~~

  node_modules/bun-webgpu/src/structs_ffi.ts:76:20
    76 type Prettify<T> = {
                          ~
    77   [K in keyof T]: T[K]
       ~~~~~~~~~~~~~~~~~~~~~~
    78 } & {};
       ~
    The expected type comes from property 'colorAttachments' which is declared here on type '{ nextInChain?: number | bigint | null | undefined; label?: string | null | undefined; colorAttachmentCount?: number | bigint | null | undefined; colorAttachments?: Iterable<{ view: GPUTextureView | null; ... 5 more ...; clearValue?: { ...; } | ... 2 more ... | undefined; }> | null | undefined; depthStencilAttachmen...'

node_modules/bun-webgpu/src/GPUDevice.ts:675:40 - error TS2339: Property 'offset' does not exist on type 'GPUBufferImpl'.

675                     offset: e.resource.offset ?? 0n,
                                           ~~~~~~


Found 4 errors in 4 files.

Errors  Files
     1  node_modules/bun-webgpu/src/ffi.ts:8
     1  node_modules/bun-webgpu/src/GPUAdapter.ts:279
     1  node_modules/bun-webgpu/src/GPUCommandEncoder.ts:36
     1  node_modules/bun-webgpu/src/GPUDevice.ts:675
Warning: TypeScript declaration generation failed
Originally created by @aaronshaf on GitHub (Aug 13, 2025). Original GitHub issue: https://github.com/anomalyco/opentui/issues/11 ``` ompat@0.17.3 + @opentui/core-darwin-arm64@0.1.1 + bun-webgpu@0.1.0 + planck@1.4.2 + three@0.177.0 + @types/bun@1.2.19 + @types/three@0.177.0 + commander@13.1.0 + prettier@3.6.2 + jimp@1.6.0 + yoga-layout@3.2.1 92 packages installed [121.00ms]  …/opentui   main  bun run build $ bun run build:native && bun run build:lib $ node scripts/build.mjs --native Building native prod binaries... Built: @opentui/core-darwin-x64 Built: @opentui/core-darwin-arm64 Built: @opentui/core-linux-x64 Built: @opentui/core-linux-arm64 Built: @opentui/core-win32-x64 Built: @opentui/core-win32-arm64 $ node scripts/build.mjs --lib Building library... Bundled 39 modules in 9ms index.js 0.44 MB (entry point) Bundled 238 modules in 44ms 3d.js 1.39 MB (entry point) supersampling-jw3fem06.wgsl 6.66 KB (asset) Generating TypeScript declarations... node_modules/bun-webgpu/src/ffi.ts:8:33 - error TS2345: Argument of type 'URL' is not assignable to parameter of type 'string | URL'. Type 'URL' is not assignable to type 'import("url").URL'. Types of property 'searchParams' are incompatible. Type 'URLSearchParams' is missing the following properties from type 'URLSearchParams': entries, keys, values, [Symbol.iterator] 8 const __dirname = fileURLToPath(new URL(".", import.meta.url)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ node_modules/bun-webgpu/src/GPUAdapter.ts:279:68 - error TS2345: Argument of type 'GPUDeviceDescriptor & { uncapturedErrorCallbackInfo: WGPUUncapturedErrorCallbackInfo; deviceLostCallbackInfo: { mode: " Types of property 'requiredFeatures' are incompatible. Type 'Iterable<GPUFeatureName> | undefined' is not assignable to type 'Iterable<"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc" | "texture- Type 'Iterable<GPUFeatureName>' is not assignable to type 'Iterable<"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc" | "texture-compressio The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. Type 'IteratorResult<GPUFeatureName, any>' is not assignable to type 'IteratorResult<"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc" Type 'IteratorYieldResult<GPUFeatureName>' is not assignable to type 'IteratorResult<"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc Type 'IteratorYieldResult<GPUFeatureName>' is not assignable to type 'IteratorYieldResult<"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compres Type 'GPUFeatureName' is not assignable to type '"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc" | "texture-compression-bc-slic Type '"texture-formats-tier1"' is not assignable to type '"force-32" | "depth-clip-control" | "depth32float-stencil8" | "timestamp-query" | "texture-compression-bc" | "texture-compress 279 const descBuffer = WGPUDeviceDescriptorStruct.pack(fullDescriptor, { ~~~~~~~~~~~~~~ node_modules/bun-webgpu/src/GPUCommandEncoder.ts:36:13 - error TS2322: Type 'GPURenderPassColorAttachment[]' is not assignable to type 'Iterable<{ view: GPUTextureView | null; loadOp: "undefined" | "cle The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. Type 'IteratorResult<GPURenderPassColorAttachment, undefined>' is not assignable to type 'IteratorResult<{ view: GPUTextureView | null; loadOp: "undefined" | "clear" | "load" | "expand-resolve-textu Type 'IteratorYieldResult<GPURenderPassColorAttachment>' is not assignable to type 'IteratorResult<{ view: GPUTextureView | null; loadOp: "undefined" | "clear" | "load" | "expand-resolve-texture"; storeOp: "undefined" | "store" | "discard"; nextInChain?: number | ... 2 more ... | undefined; depthSlice?: number | ... 1 more ... | undefined; resolveTarget?: GPUTextureView | ... 1 more ... | undefined...'. Type 'IteratorYieldResult<GPURenderPassColorAttachment>' is not assignable to type 'IteratorYieldResult<{ view: GPUTextureView | null; loadOp: "undefined" | "clear" | "load" | "expand-resolve-texture"; storeOp: "undefined" | "store" | "discard"; nextInChain?: number | ... 2 more ... | undefined; depthSlice?: number | ... 1 more ... | undefined; resolveTarget?: GPUTextureView | ... 1 more ... | unde...'. Type 'GPURenderPassColorAttachment' is not assignable to type '{ view: GPUTextureView | null; loadOp: "undefined" | "clear" | "load" | "expand-resolve-texture"; storeOp: "undefined" | "store" | "discard"; nextInChain?: number | bigint | null | undefined; depthSlice?: number | ... 1 more ... | undefined; resolveTarget?: GPUTextureView | ... 1 more ... | undefined; clearValue?: {...'. Types of property 'view' are incompatible. Type 'GPUTextureView | GPUTexture' is not assignable to type 'GPUTextureView | null'. Type 'GPUTexture' is not assignable to type 'GPUTextureView'. Types of property '__brand' are incompatible. Type '"GPUTexture"' is not assignable to type '"GPUTextureView"'. 36 colorAttachments ~~~~~~~~~~~~~~~~ node_modules/bun-webgpu/src/structs_ffi.ts:76:20 76 type Prettify<T> = { ~ 77 [K in keyof T]: T[K] ~~~~~~~~~~~~~~~~~~~~~~ 78 } & {}; ~ The expected type comes from property 'colorAttachments' which is declared here on type '{ nextInChain?: number | bigint | null | undefined; label?: string | null | undefined; colorAttachmentCount?: number | bigint | null | undefined; colorAttachments?: Iterable<{ view: GPUTextureView | null; ... 5 more ...; clearValue?: { ...; } | ... 2 more ... | undefined; }> | null | undefined; depthStencilAttachmen...' node_modules/bun-webgpu/src/GPUDevice.ts:675:40 - error TS2339: Property 'offset' does not exist on type 'GPUBufferImpl'. 675 offset: e.resource.offset ?? 0n, ~~~~~~ Found 4 errors in 4 files. Errors Files 1 node_modules/bun-webgpu/src/ffi.ts:8 1 node_modules/bun-webgpu/src/GPUAdapter.ts:279 1 node_modules/bun-webgpu/src/GPUCommandEncoder.ts:36 1 node_modules/bun-webgpu/src/GPUDevice.ts:675 Warning: TypeScript declaration generation failed ```
kerem closed this issue 2026-03-14 08:28:55 +03:00
Author
Owner

@kommander commented on GitHub (Aug 13, 2025):

Ah yes, it still works though. It's some type/version conflict with the bun-webgpu package, I'll fix that.

<!-- gh-comment-id:3186090705 --> @kommander commented on GitHub (Aug 13, 2025): Ah yes, it still works though. It's some type/version conflict with the bun-webgpu package, I'll fix that.
Author
Owner

@kommander commented on GitHub (Aug 14, 2025):

@aaronshaf I fixed the bun-webgpu package and upgraded in opentui. The type errors at build time should be resolved.

<!-- gh-comment-id:3188531603 --> @kommander commented on GitHub (Aug 14, 2025): @aaronshaf I fixed the bun-webgpu package and upgraded in opentui. The type errors at build time should be resolved.
Author
Owner

@kommander commented on GitHub (Aug 15, 2025):

This should not happen anymore, re-open if it does.

<!-- gh-comment-id:3190843584 --> @kommander commented on GitHub (Aug 15, 2025): This should not happen anymore, re-open if it does.
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#772
No description provided.