Comments (9)
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. 👍
from elm-watch.
Hi!
I can't figure out what this error is telling me.
There was a crash in Elm’s compiled JS. That is not supposed to happen. Most likely it’s due to a bug in elm-watch triggered by some piece in your Elm code that I have never thought of before. It could also be due to a postprocess script. Do you use the “postprocess” feature of elm-watch?
I cant really see a way to "turn debug mode off" though.
It’s currently not possible to switch compilation mode when the app fails to initialize. (Maybe I can improve that, though.) A workaround is to delete elm-stuff/elm-watch/stuff.json
, restart elm-watch and refresh the page.
Would you be able to share the broken cart-widget.elm.js
with me somehow? Then I could debug it.
from elm-watch.
Would you be able to share the broken cart-widget.elm.js with me somehow?
Yes, on Monday, when I get back to the computer.
And no postprocess script. I was thinking of adding one to see if that helped work around this bug, but never got that far.
The only thing I can think of that's vaguely unique is having many instances of the same app running, but that's never been a problem before. Besides, that's not the app that's crashing; it's a Platform.worker
. It doesn't have any UI.
I'm planning on moving it to a web worker, mostly to handle multiple tabs.
from elm-watch.
This is the elm-watch.json
.
{
"targets": {
"CartWidget": {
"inputs": ["elm/CartWidget.elm", "elm/CartViews.elm"],
"output": "public/js/cart-widget.elm.js"
},
"AdminOrder": {
"inputs": ["elm/AdminOrder.elm"],
"output": "public/js/admin-order.js"
},
"BookingWidget": {
"inputs": ["elm/BookingWidget.elm"],
"output": "public/js/booking-widget.elm.js"
}
},
"port": 44331
}
Never got around to trying the other targets.
from elm-watch.
Which of the .elm files contains the Platform.worker
? CartWidget.elm
?
Not that you are not even supposed to be able to switch to debug mode for workers:
Edit: I managed to reproduce it now. It happens when one input (CartWidget.elm
) is a Platform.worker
and another input (CartViews.elm
) is Browser.element
, of the same target. Then it’s possible to enable the debugger (since one of the inputs can use it), but it causes a crash. Good catch!
from elm-watch.
Interesting. The way I usually build, the way I want to replace, is an npm script:
"elm-live elm/CartWidget.elm elm/CartViews.elm --no-server -- --debug --output=public/js/cart-widget.elm.js",
I wonder why that's never been a problem before.
from elm-watch.
Because you weren’t using elm-watch :) elm-watch has its own hot reloading implementation, and I introduced a bug when programs that do and do not support the debugger are bundled in the same output.
from elm-watch.
Great, I’ll try to fix the bug soon!
from elm-watch.
Fix released in v1.1.1.
from elm-watch.
Related Issues (20)
- Missing "resolved" and "integrity" from lock file HOT 5
- Ability to set domain for websocket server HOT 3
- Ability to set domain for websocket server HOT 1
- source-directories with big ancestor directory → file watcher error HOT 2
- Running 'example-minimal' in devcontainer wsl2 - not picking up changes to *.elm HOT 2
- Runtime error after build with --optimize HOT 10
- Getting the error `Error: spawn Unknown system error -8` when using Node 18 HOT 9
- Allow overriding the output file for a target HOT 6
- Allow building a file with the hot-reload code inserted HOT 1
- File changes made don't trigger hot reload - WSL2
- RFC: Overhaul HTTPS support HOT 13
- how would you use elm-optimize-level-2 with elm-watch? HOT 2
- Command line is too long error HOT 1
- dynamically specifying output location HOT 6
- using a known hostname but dynamic port HOT 8
- Add output to postprocess arguments HOT 2
- Permission denied when running as root HOT 2
- elm-watch hangs on error HOT 6
- watching through symlinks HOT 1
- elm-watch hangs on error in dependency stage HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-watch.