无法安装 elm-lang/html 1.0.0

Cannot install elm-lang/html 1.0.0

我是 ELM 的新手,我想执行这段代码:

import Html exposing (..)

main = 
    text "hola yassine"

使用 elm platfrom 0.16。

现在,当我调用 http://localhost:8000/test.elm 时出现此错误:

I cannot find module 'Html'.

Module 'Main' is trying to import it.

Potential problems could be:
  * Misspelled the module name
  * Need to add a source directory or new dependency to elm-package

当我执行 elm package install elm-lang/html 1.0.0 导入它时,我遇到了这个取决于路径的问题: error

有人可以帮助我吗? 非常感谢。

您说您使用的是 Elm 0.16。 elm-lang/html 是从头开始编写的 for Elm 0.17,它显着改变了基本的语言特性(最显着的是废除了信号)。您可以尝试使用 evancz/elm-html 4.0.2(支持 Elm 0.16 的最新版本)或者您可以升级到 Elm 0.18(截至 2016 年 11 月,最新版本)。