使用 elm-reactor 时 Elm 'Hello World' 程序不是 运行

Elm 'Hello World' program not running when using elm-reactor

我刚开始使用 Elm。当我 运行 我的 hello world 示例(link 下面给出的代码截图)使用 elm-reactor 时,浏览器上出现空白页面。控制台上还有一条错误消息,将其描述为参考错误(下面给出的屏幕截图的 link)。但是,当使用 elm-make 从代码创建 html 文件时,它运行成功。

Link to tutorial site referred to write the hello world example.

请帮助我找到问题的解决方案。如果您需要更多信息,请发表评论。

使用的 Elm 代码:​​

module Hello exposing (..)

import Html exposing ( text, Html )

main : Html a
main = text "Hello"

浏览器控制台上的错误消息:

ReferenceError: runElmProgram is not defined.

浏览器输出为空白屏幕。

在 Elm 中,模块名和文件名应该以大写字母开头。只需将您的模块重命名为 Hello 并将您的文件重命名为 Hello.elm.

谢谢大家的建议。也许,这是由于我安装 Elm 的方式(从源代码构建)。通过使用 npm 从头开始​​重新安装 elm 解决了这个问题。