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
I filed this issue previously but I have since disabled SSR because I've had so many problems with it. Today even the 'counter' example wasn't working at all with SSR enabled (I'm using NodeJS 20.2.0) -- but it inexplicably started working again. The following scenario is consistent, however:
http://localhost:4000/svelte/timeline crashes because it says < Accordion> doesn't support SSR. However, SSR works fine with this component when running under SvelteKit. It's also a devDependency (regular dependencies cause problems with SSR). No idea what's going on! Maybe it's esbuild's fault. I need to experiment with vite.
The text was updated successfully, but these errors were encountered:
Not sure if this is related to your issue, but I've been dealing with a similar crash whenever the render function is called {:node_js_worker_exit, {{:badarg, [{:erlang, :port_command, [#Port<0.69>, "[[\"server\",\"render\"]
Whenever my Svelte component is rendered, it'll trigger a callback function and call live.pushEvent
viewDidMount: function (info) {
live.pushEvent("svelte_viewDidMount", info)
},
However, I think because the Erlang port is in use during the render function, live.pushEvent will try using the same resource to communicate back to Phoenix and cause the crash. (no idea if this is true, just a theory). @woutdp, am I on the right track?
Anyways, I changed the callback function to become async and now there's no issues
viewDidMount: async function (info) {
// Wrap your asynchronous code in an async function
async function asyncOperations() {
// Your async operations here
await live.pushEvent("svelte_viewDidMount", info);
}
// Call the async function
asyncOperations()
.then(() => {
console.log("Async operations completed");
})
.catch((error) => {
console.error("Error in async operations:", error);
});
},
I filed this issue previously but I have since disabled SSR because I've had so many problems with it. Today even the 'counter' example wasn't working at all with SSR enabled (I'm using NodeJS 20.2.0) -- but it inexplicably started working again. The following scenario is consistent, however:
mix phx.server
). Hopefully you have Postgres installed already.Result: Error in browser. The following is sent to the console:
Other Items of Interest
The text was updated successfully, but these errors were encountered: