question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error related to debug mode?

See original GitHub issue

I’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:closed
  • Created 10 months ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Odalrickcommented, Nov 14, 2022

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. 👍

0reactions
lydellcommented, Dec 2, 2022

Fix released in v1.1.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in debug mode - Stack Overflow
I believe the issue may be that IIS runs in single-threaded mode when debugging. The Server.Transfer queues a message behind the current ...
Read more >
Debugging methods and error types - HubSpot Developers
Understanding how to debug and look into errors when developing websites on the HubSpot CMS.
Read more >
How to Debug JavaScript Errors - Rollbar
Identifying the underlying causes of most JavaScript errors can be difficult. Learn the common steps towards pinpointing and resolving ...
Read more >
Use debug mode to fix a WordPress error - GoDaddy
Start by enabling debug mode for your WordPress site. After enabling debug mode, compare the error on your site to the examples in...
Read more >
How to Use the WordPress Debug Mode to Fix Site Errors
Sometimes you need to give your site a shakedown to reveal the cause of an error. This post will show you how to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found