-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught ReferenceError and Unexpected end of input using GraphicSVG Library #67
Comments
When I run Ellie locally, I see this info message in the logs when it's failing:
And before that, I see this line, reflecting when I installed the
It looks like the package wasn't installed correctly, but I don't see any further leads at the moment. |
After directly installing the transitive dependencies, I get a different error:
The only thing I have found so far is elm/browser#20, which apparently originates in |
It appears the compilation failure was due to a bad interaction between So that's good news. However, the original issue remains: namely that the transitive dependencies of Also, the |
Building on this further, we determined that it is the If you try to compile the code before installing If this happens, you need to actually do the following to make it work:
Under the hood, this error seems to be a weird EOF error where the JavaScript file ends on a certain line (doesn't seem to be in the middle of a line, just all the sudden stops). In summary, we appear to have run into and successfully unscrambled (after a bit of effort -- we naturally assumed it to be one bug at the beginning) two bugs with Ellie:
|
I just hit this error it seems too, trying to use the example from the Debouncer package without modification: https://github.com/Gizra/elm-debouncer/blob/2.0.0/examples/src/Basic.elm It would seem to use |
Also |
@readevalprint Did you try adding all of that package's (other) dependencies to the dependencies in Ellie? |
@CSchank The only dependency I attempted to install was |
This is due to Ellie compiling with To recreate locally: $ mkdir temp && cd temp
$ elm init
$ elm install Gizra/elm-debouncer copy: module Main exposing (main)
import GraphicSVG exposing (..)
import GraphicSVG.EllieApp exposing (GetKeyState, gameApp)
init =
{ time = 0 }
type Msg
= Tick Float GetKeyState
update msg model =
case msg of
Tick t _ ->
{ model | time = t }
view model =
collage 500
500
[ circle model.time |> filled orange ]
main =
gameApp
Tick
{ model = init
, view = view
, update = update
, title = "Ellie Example" -- This is the title of the browser window / tab
} into $ elm make src/Main.elm --debug observe: Dependencies loaded from local cache.
Dependencies ready!
Success! Compiled 1 module.
elm: Map.!: given key is not an element in the map
CallStack (from HasCallStack):
error, called at libraries/containers/Data/Map/Internal.hs:603:17 in containers-0.5.10.2:Data.Map.Internal An issue exists for the compiler here: elm/compiler#1851 A feature request for adding the |
Hi, we have an Elm graphics library MacCASOutreach/GraphicSVG which we are trying to use with Ellie. The library is written in pure Elm with no ports or anything like that. While the Elm compiles fine (as evidenced by the "Compile successful" text in the bottom-right of Ellie), we are receiving two runtime errors while using this library on Ellie and we're not sure how to debug them:
The second one is particularly strange and may be the source of the first. When inspecting the error in the JavaScript console, it appears as if the generated JavaScript (
workspace
) simply ends on (rather abruptly!) the 11770th line:This appears to be a server-side issue and the issue has been recreated on several browsers and machines (to name a few, Chrome 69 and Safari 12.0.1 on macOS). A minimal example of these errors is available at https://ellie-app.com/3MN8kJX3zhma1 for you to see for yourself.
Any idea how we can fix this?
Best regards,
Chris
The text was updated successfully, but these errors were encountered: