Can the function "createViewState" run in nodejs ? #1666
-
I try to wrap the JBrowse2 in a Python Reflex app. The React component So I want to ask if there are some differences for this function between running in a browser and Node.js. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi there, If you share exact errors you get, it might be helpful The createViewState can be run in a nodejs environment and it shouldn't matter in terms of compressed files as far as I know An example of createViewState running in a pure node.js non-browser environment is in our @jbrowse/img (aka jb2export) tool This is used to render static SVG just from node.js With that said, JBrowse is primarily a client side app. I can see some interesting examples in the Reflex docs, I dunno if I got time to try it out for time being, but I am happy to help troubleshoot if you have errors you see |
Beta Was this translation helpful? Give feedback.
Thank you for making a nice reproducible test case...seriously! it helps a ton
I checked it out
I see reflex uses next.js under the hood. In a hidden directory called .web, there is a full nextjs app. The problem seems to be that it pins to next 15.0.4. After updating to the latest next.js, it works
Specifically, I manually changed the line in .web/package.json
Then I ran yarn and ran re-ran the app and it worked
So the issue seems to be with the older version of next.js. not sure if this is the most standard way to fix the issue, maybe reflex needs to update the version of nextjs they use