Ray Kholodovsky - I tried to use the exact exam...

I tried to use the exact examples at the top of each: https://www.npmjs.com/package/@tscircuit/circuit-preview https://github.com/tscircuit/runframe in a blank nodejs project and they do not work. Claude is under the impression that there are too many external deps that are not bundled with runframe. in any case, both things appear broken today without "some advanced knowledge of how to fix / make work" that is not in the readme.
GitHub
GitHub - tscircuit/runframe: Runs tscircuit code inside a webworker...
Runs tscircuit code inside a webworker, view PCBs, schematics and 3D previews - tscircuit/runframe
23 Replies
Ray Kholodovsky
Ray KholodovskyOP3w ago
for reference, I was just trying to mock up a basic circuit render like how it's done in the docs, even if the "how to docusaurus with tscircuit" example isn't ready yet.
No description
Seve
Seve3w ago
Yea RunFrame requires installing a bunch of stuff this is actually intentional but we are lazy about documenting it- the reason it is intentional is related to how RunFrame has a lot of different ways it is able to be run
Ray Kholodovsky
Ray KholodovskyOP3w ago
Ok, since my goal here is to just use CircuitPreview for basic docs examples can I reiterate the request to “the basic CircuitPreview example should work in a empty project, please show me how/ fix it”?
Seve
Seve3w ago
CircuitPreview from the docs? This uses our build/svg server, I think what you're asking for is build-time server compilation for circuits for custom docs sites which is actually a pretty tall ask RunFrame compiles in-browser which is simple, but having build-time compilation of circuits is non-trivial our docs use a build server that has access to public circuit modules, it can't access private modules by design
Ray Kholodovsky
Ray KholodovskyOP3w ago
Should this work standalone in an empty project or no?
Seve
Seve3w ago
that is for browser-side building, and actually i'm not sure that that module is maintained/was meant to be used externally although it's a good idea to make it work externally that module was developed for our ChatGPT integration
Seve
Seve3w ago
to be fair, the README says this
No description
Ray Kholodovsky
Ray KholodovskyOP3w ago
Right, and unless there’s a hidden difference, your docs use CircuitPreview but as I seem to have discovered there are a bunch of hidden internal reps I’m unaware of.
Seve
Seve3w ago
the docs do not use this CircuitPreview module the docs define the CircuitPreview component themselves, and use the svg build server
Ray Kholodovsky
Ray KholodovskyOP3w ago
Ok, that is good to know.
Seve
Seve3w ago
yes sorry about the confusion- the chatgpt integration was challenging and we made several poorly named modules
Ray Kholodovsky
Ray KholodovskyOP3w ago
The same name but different was probably a good chunk of why I was confused. The lack of docs on how to use runframe in a blank slate is also part of it.
Seve
Seve3w ago
Yea needs to be made!!! Agree
Ray Kholodovsky
Ray KholodovskyOP3w ago
I don’t think this is what I’m asking for at least not right now? But I think you’re onto how I imagine our final docs site being. For displaying a super simple circuit in someone else’s browser, my options are: A) build it and static display the circuit json result B) just tsx + deps and the end user’s browser renders it. C) something like B that involves the building in some cloud, idk? Right now I’m just trying to achieve B. I was under the impression that’s what CircuitPreview or runframe could do.
Seve
Seve3w ago
Yes B should work!!
Ray Kholodovsky
Ray KholodovskyOP3w ago
Ok so again to my point, this doesn’t work for me, prob because as you said it’s outdated And if I want to do it in runframe I will need to know what deps/ other unique things to do to make it work in an empty project. And you have made the issue so I guess we are in agreement/ don’t need to talk in circles
Seve
Seve3w ago
Yep, we will fix You can actually do it wo dependencies
Seve
Seve3w ago
Running tscircuit inside an iframe | tscircuit docs
tscircuit can be evaluated inside an iframe. This makes it easy to embed snippets on a webpage without complex build systems.
No description
Seve
Seve3w ago
i know another company was using this at one point
Ray Kholodovsky
Ray KholodovskyOP3w ago
I was operating under the belief that using an iframe was inherently less efficient/ performant/ reliable vs a "native" solution so I did not try it.
Seve
Seve3w ago
The only downside in this case is you will always use the latest tscircuit version

Did you find this page helpful?