Error related to debug mode?
See original GitHub issueI’m getting this error when I try to use hot reloading:
Uncaught TypeError: can't access property "$", state is undefined
$elm$browser$Debugger$Main$getLatestModel cart-widget.elm.js:19763
wrapSubs cart-widget.elm.js:19778
F2 cart-widget.elm.js:2872
_Platform_initialize cart-widget.elm.js:4776
_Platform_worker cart-widget.elm.js:4722
F4 cart-widget.elm.js:2881
init cart-widget.elm.js:5402
initApp cart-widget.coffee:136
<anonymous> cart-widget.coffee:465
<anonymous> cart-widget.js.js:35501
<anonymous> cart-widget.js.js:35503
I can’t figure out what this error is telling me.
The compiled files are loaded one after another in the browser, so I don’t think it is an execution order issue.
<script src="/js/cart-widget.elm.js"></script>
<script src="/js/cart-widget.js.js"></script>
I had it working before, but I tried enabling the debug mode; it failed and figured I’d work on that later once I got everything else working. I’m not sure if that is related to this issue.
I cant really see a way to “turn debug mode off” though. Will restarting elm-watch do it?
Some details that may be relevant:
cart-widget.coffee
and cart-widget.js.js
are the same file, webpack has compiled it and the original name is read from the source map in the backtrace. cart-widget.elm.js
is the compiled Elm code.
I have a “backend” worker that maintains one state for the entire page and a few “frontend” apps that are just views. They send and receive messages through ports and the cart-widget.coffee
is responsible for creating the different Elm apps and connecting them to each other.
Everything is served from docker and a Ruby on Rails app, but that should be irrelevant; the actual files are essentially served by a static file server, and the app doesn’t get far enough to start failing http requests.
Issue Analytics
- State:
- Created 10 months ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
I got back and deleted the elm-stuff directoty, and it started working again. 😃
I have the crashing file saved, but I don’t suppose there is much point in posting it.
The tool itself looks great. Do one thing, and do it well. I’ll configure the rest to work with my set up. 👍
Fix released in v1.1.1.