This is almost always the result of some browser extension or external javascript modifying the DOM: Elm’s vdom assumes it’s the only thing touching the parts of the DOM it owns (or the whole body, if its a Browser.document)
I’m not really all that familiar with Phoenix or LiveView, but I don know I’ve worked on app that used both Elm and LiveView so presumably it’s possible.
If you’re sure it’s not an extension messing with the DOM, I guess I’d check to make sure that whatever your Phoenix code is doing isn’t messing with anything that Elm controls (so the element you mount your app onto and any of its children).
client_ledger.js and client_db.js are my client files that receive and send json objects over the Phoenix channels. elm_ledger.js and elm_db.js are my compiled Elm front ends.
Don’t think i can help, but it might be helpful to clear something up:
You only wrote
but the next response seemed to assume you were using LiveView building on top of phoenix channels
so now i’m left wondering what exactly is your case:
Are you simply using Phoenix channels for communcation with your backend?
Or are you using Phoenix LiveView as well as Elm to create a dynamic frontend?
(Just to note: I have successfully used simple phoenix channels to communicate with my backend in Elm without any problems, so i would assume that situation would not cause you problems.)
Hope my confusion is clear and my question makes sense…!
Recently experienced this same issue bit after adding a datepicker component. Whenever I modified styles, the webapp would begins to crash. Live-reload is a good bet as the error would only happen when I made changes.