3D Viewer, jscad-fiber, jscad-electronics, React 19 Issue
@Seve can you please take over the dependency issues in 3d-viewer and runframe? I have so much to do and I've been stuck for days, I don't want to waste any more time on this
64 Replies
Yes maybe I can bring @Rishabh or @Abimael Martell in on this as well...
@Rishabh @Abimael Martell the issue is we have multiple react versions caused by dependencies iiuc
It is on the main branch of the 3d-viewer and can be seen looking at the storybook
the issue also breaks runframe when you try to update it's deps
clarification: When you update 3d-viewer in RunFrame, it breaks
i found a possible root in jscadfiber
prolly i found a fix, sending experimental patches

in the 3d-viewer check the second keyboard story
doesn't extranous packages mean you need to delete the node modules?
idk
i think Shibo is saying if you do
rm -rf node_modules && bun i
those deps will be removed
they're only there because your node modules is stale
idk worth a try igalready tried
worked

Hell yea
Yes lets do it
Ok few things
- this is working with vite polyfills, on vite server
- is this review valid or not. Without that change it's throwing type errors
https://github.com/tscircuit/jscad-fiber/pull/113#pullrequestreview-3112565099
If nothing's wrong i would merge jscad pr
And then update 3d, runframe and tscircuit.com
yea your code is wrong
the type error is fixeable via changing the intrinsic-jsx
it's definitely recursive and should crash
but otherwise yea that plan sounds good
@DOPΣ just to be on the same page, how did you determine an issue got fixed? The issue didnt break the viewer for me just caused components that use jscad-electronics to throw a reconciler error
Something like this

But thats in 3d-viewer, I think in runframe it breaks completely, sorry, maybe I'm just confused
That error is still there ig
I'm trying to fix React Owner undefined error
I expiernced on runframe and threed view'
I'm not saying completely fixing but locally when I tried jscad updated fiber linked with3d and runframe it's working with latest 3d viewer
For 3d viewer check there might be some story showing react owner error on latest version, I forgot where I saw
I'm updating jscad then threede view and runframe
To see if the error i identified earlier React owner is fixed or not
For your error I'm not sure, but yeah the symptoms are same
clarification: When you update 3d-viewer in RunFrame, it breaksUm we can't be sure 109% till we ship it so yeah risking merge jscad fiber pr
try clearing console, that would work
fixed that in prod 3d-viewer

Awesome
What about runframe?
on it updating in prod
these deps install take lifetime
How?

We need to check bundle sizes more, many modules are accidentally bundling
You running windows?
ofc ;-;


Use wsl
It's great, will solve your slow dep install issues
umm is ok normally, but when my ram usage reaches heights, it struggled, ill update ram soon, thx
@DOPΣ any updates on runframe?
I'm tired trying to fix 3d preview for tscircuit.com w/runframe
Latest react 19 is working fine on jscadfiber 3d viewer and runframe
But on tscircuit.com 3d preview is coming very much stretched
Im noob in threejs, since you transported from fiber to vanilla three, can you find any fix?
Even tried with ai,
You can try latest runframe with latest 3d view (or take from my unmerged pr), build it locally and try bun link to use with tscircuit.com locally
Also I need to update circuit json on fiber and 3d viewer to prevent crypto error you might face
K, give me your fork/branch Ill test with it
Oh randomlyy bot pr merged and conflicts, too much struggle


nvm, fixed it
are you able to repro?
first time this happens
ram issue
I'm seeing this issue

@DOPΣ I fixed the overflow issue, but now when I yalc push runframe to tscircuit.com It doesn't update
any idea why that could be?
Can you send pr where you fixed issue? I can try locally
I didn't fix your issue with the 3d-viewer, just my issue with stackoverflow
oh, try bun link, then
now in tscircuit.com I get a react error, updating react and react-dom 19 didn't fix the issue, what did you do to resolve that?
Umm it's working fine for me locally, can you send error
the only thing I've done is link runframe and update react and react dom to 19
Prolly it's not updated, try clearing node modules and install with --no-cache
That error is most prolly because of react18
:/ that's best I know, worked for me
I managed to get it working, and I reproduced your issue
let me see if I can find a fix
Thanks 😭
Did you try changing the style of the 3d-viewer? I ruled out runframe I'll test changing 3d-viewer later on
Umm yea, but didn't worked, or prolly idk what to change in three
@DOPΣ no luck

@Seve can you help with this?
Is it on main?
Note that Abse just got a version of jscad electronics that doesn’t require react to work
Sry havent been following tell me how to repro and can jump on it, tscircuit.com or runframe?
runframe and tscircuit.com, the main problem is that the 3d-viewer in tscircuit.com doesn't scale properly
like this
I and Arnav couldn't find a solution
This is on main?
Or do i need to update 3d-viewer
you do, and also update to react 19
Kk
so not on main
@shibo @DOPΣ so i'm super limited on time this week due to the funding stuff (I spent all day doing paperwork/projections and stuff) but I just did
bun update --latest react react-dom @types/react @tscircuit/3d-viewer
and made sure to clear the lockfile and node modules and it seemed to work just fine (PR here but it can't be merged and I'm not working on it so can be ignored or just used as reference https://github.com/tscircuit/runframe/pull/1011)
The only thing that seems to not work is the jscad footprints. I'm guessing that jscad-electronics is incorrectly bundling react based on the error (remember, react should never be bundled, to not be bundled it needs to be a peerDep or external)
MY SUGGESTION TO FIX: @Abse merged a PR recently that created a version of jscad-electronics that doesn't use/need React. It can be used via import { getModelFromFootprint } from "jscad-electronics/vanilla
. This would probably fix the issue easily and prevent any issues with transient React!
Im busy with boards and SPICE sim, I doubt I'll have tine for this