elm-spa icon indicating copy to clipboard operation
elm-spa copied to clipboard

Elm-spa failed to understand an error

Open lesliev opened this issue 3 years ago • 7 comments

Hi!

This output doesn't seem that useful, but I don't know what else to include. I can't see anything on your website explaining where any other logs are located. I'm running Ubuntu 18.04.5 LTS.

╰─➤  npm install -g elm-spa@latest
╰─➤  mkdir elm-pixelgrid 
╰─➤  cd elm-pixelgrid 
╰─➤  elm-spa new elm-pixelgrid

  May I create a new project in the current folder? [y/n] y

  ✓ New project created in:
  /home/leslie/dev/git/other/mine/rubynights/elm-pixelgrid

╰─➤  elm-spa server

Ready at http://localhost:1234

! elm-spa failed to understand an error

Please report the output below to https://github.com/ryannhg/elm-spa/issues

-----

{}

-----

! elm-spa failed to understand an error

Please send the output above to https://github.com/ryannhg/elm-spa/issues

lesliev avatar Jul 23 '21 10:07 lesliev

Hi, I have the same output but a different setup.

In my project it was working but when I added a bunch of things (I migrating from a vanilla app to elm-spa) I had this error. It may be due to a circular dependency or something else but the output is definitely not helping troubleshoot ^^

I have "ryannhg/elm-spa": "6.0.0" in my elm.json and elm-spa 6.0.4 locally.

loicknuchel avatar Jul 28 '21 14:07 loicknuchel

Reading at many other issues, it seems that this generic error {} is pretty common. I could see the real error using elm make .elm-spa/defaults/Main.elm (and it was a circular dependency as expected ^^). I think it would be nice to display the relevant error, or at least, suggest this command as fallback...

loicknuchel avatar Jul 28 '21 14:07 loicknuchel

Update: I've just tried the above commands again and this time the server ran without error. This is with elm-spa 6.0.4, I don't know what previous version I was using.

lesliev avatar Jul 28 '21 22:07 lesliev

I'm having the same problem with new projects on elm-spa 6.0.4 on Ubuntu 20.04.3.

For me the issue also seems to be due to an Elm build error, but in my case it's ConnectionTimeout (because of some firewall stuff on my computer that was happening at the time).

dzuk-mutant avatar Sep 30 '21 21:09 dzuk-mutant

Just a quick update. It seems that with elm-spa command you don't have compilation errors in your browser.

So for that, I'm now using this command: elm-live .elm-spa/defaults/Main.elm --dir=public --pushstate -- --output=public/dist/elm.js

The only drawback: it doesn't generate new pages. So when I create a new page, I have to run elm-spa gen once, and then go to my elm-live server.

Just to let you know in case it helps people! Cheers.

loicknuchel avatar Oct 01 '21 18:10 loicknuchel

In my case, the Elm-spa failed to understand an error error was caused by a Debug.log in my code.

joanllenas avatar Nov 15 '21 21:11 joanllenas

In my case, the Elm-spa failed to understand an error error was caused by a Debug.log in my code.

Thank you, I would never have figured this out.

isaacbrown92 avatar May 18 '22 16:05 isaacbrown92