elm-lang / elm-reactor

Interactive development tool that makes it easy to develop and debug Elm programs.
BSD 3-Clause "New" or "Revised" License
428 stars 63 forks source link

[alpha] Two Errors in JavaScript console running simple program in Elm Reactor #209

Closed clarkware closed 7 years ago

clarkware commented 7 years ago

I'm getting two errors in the JavaScript console when running a simple Hello World app in Elm Reactor using Elm 0.18.0.

OS: Mac OS X 10.11.6 Browser: Chrome Version 54.0.2840.71 (64-bit)

screen shot 2016-10-25 at 10 30 17 am

Also, I'm not seeing the result of Html.text being displayed in a simple "main" definition, whereas the text is displayed if I use "beginnerProgram". Here's a specific example. Given the following program, the HTML text "Hello!" is not being displayed in the browser:

module Main exposing (..)

import Html

main =
    Html.text "Hello!"

However, if I switch the program around to use a bare-bones "beginnerProgram" as follows, then the "Hello!" text is displayed in the browser as expected:

module Main exposing (..)

import Html

update msg model =
    model

view model =
    Html.text "Hello!"

main =
    Html.beginnerProgram
        { model = 0
        , view = view
        , update = update
        }

In both scenarios, the two JavaScript errors are shown in the error console.

process-bot commented 7 years ago

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

evancz commented 7 years ago

Thanks for the report, should be fixed in the next alpha!

clarkware commented 7 years ago

Cool, thanks! Sorry, I looked around to see if it was a duplicate but didn't think to look in elm-make. Hopefully the multiple reports helped you triangulate. :-)

evancz commented 7 years ago

No worries, folks are opening these all over, so I'm losing track too! Definitely helpful to have the report here :)