tsci export -f glb can't load a relative cadModel stepUrl (404); build --glbs can

Open
#5,654 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@jeffrey-graham is already working on this.

Since Nov 7, 2026.

  • #5656 by @tonnylegacy — closed without merging
  • #5657 by @Abse2001 — closed without merging
  • #5718 by @Crodify — closed without merging
  • #5728 by @jeffrey-graham — open
  • #5775 by @aswadi — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
cli, react, typescript
Domain
cli

Research direction

The bug is in tsci export -f glb, which fails to resolve a relative cadModel stepUrl (404) while tsci build --glbs succeeds on the same file. Compare how the two commands pass the project base URL to circuit-json-to-gltf, starting with the export path. Two open pull requests (#5656, #5657) already target this, so check them before starting. Done means a GLB exported with the STEP model included, matching the size from build.

Written by the indexing model from the issue text.

Description

tsci export -f glb can't load a cadModel with a relative stepUrl, but tsci build --glbs loads the same file.

// index.tsx, with libraries/cap.step next to it
export default () => (
  <board width="10mm" height="10mm">
    <capacitor name="C1" capacitance="100nF" footprint="0402" cadModel={{ stepUrl: "./libraries/cap.step" }} />
  </board>
)
$ tsci export index.tsx -f glb -o export.glb
Failed to load STEP from ./libraries/cap.step
error: Failed to fetch STEP file: 404 Not Found
$ tsci build index.tsx --glbs
[index] Written 3d.glb

The export still writes a GLB, without the model: 21 KB against 63 KB from build. It looks like export doesn't pass the project base URL to circuit-json-to-gltf the way build does.

Versions: tscircuit 0.0.3055, @tscircuit/core 0.0.2252, @tscircuit/cli 0.1.2428, circuit-json-to-kicad 0.0.263, Bun 1.3.11.

Dominant language
TypeScript
Stars
19
Forks
115
Avg merge
1h 50m
Merged PRs (30d)
260

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tscircuit/cli

All issues in tscircuit/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.