You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is the Graphology import throws errors in the island for apparent babel / node style imports and the Sigma import throws errors because it has browser only deps that should only be accessed behind IS_BROWSER. I have tried placating the vite's dismissal of the Graphology import with node polyfills, but only came up with a plethora of other errors and dynamically importing Sigma after IS_BROWER but got "TypeError: Failed to fetch dynamically imported module" with what looks like a valid path to the node_modules package. I can import Graphology in an api file, so I began scheming on doing the graph work there and passing a serialized result downstream or including simple cdn imports in the app html template and somehow accessing them, but before I go down any ratholes, wanted to check here first, as I feel I am fundamentally missing how Fresh and ssr work, as it shouldn't be this difficult to get started... Thanks for any advice or links to RTFM.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is not an issue with Fresh, forgive my ignorance of ssr, vite, etc...
I am trying to get a simple example such as this working:
Which I imagine should go into an island file with a simple preact wrapper like:
In deno.json I have these import entries:
The issue is the Graphology import throws errors in the island for apparent babel / node style imports and the Sigma import throws errors because it has browser only deps that should only be accessed behind IS_BROWSER. I have tried placating the vite's dismissal of the Graphology import with node polyfills, but only came up with a plethora of other errors and dynamically importing Sigma after IS_BROWER but got "TypeError: Failed to fetch dynamically imported module" with what looks like a valid path to the node_modules package. I can import Graphology in an api file, so I began scheming on doing the graph work there and passing a serialized result downstream or including simple cdn imports in the app html template and somehow accessing them, but before I go down any ratholes, wanted to check here first, as I feel I am fundamentally missing how Fresh and ssr work, as it shouldn't be this difficult to get started... Thanks for any advice or links to RTFM.
Beta Was this translation helpful? Give feedback.
All reactions