Code crashes after --debug switch removed from compiler

Hi All,

trying to play with Elm and it worked fine at first when I was doing development with --debug mode. After I removed this switch from the command line my element started crashing showing TypeError: undefined has no properties and TypeError: domNode is undefined. There is other big JS component on the same page built with JS, but their containers do not intersect, though jquery is used.

Not quite sure how to start untangling the situation, it’s my first experience with Elm, and I decided to go small steps and use an element embedded into a bigger page…

Any suggestion is appreciated! TIA,

I think you will have to be more specific for anyone to be able to help you :confused:

Oh, I’m sorry. I should’ve marked it as resolved. The issue was that I was trying to call Elm.init several times on the same page in a js button event handler with different set of flags. After I changed my elm component to accept params through a port, all started working fine. So init called only once, and then different buttons send different messages through the port. It’s in case somebody tries to repeat my newb mistake :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.