Elm “cannot find module”

后端 未结 1 1814
攒了一身酷
攒了一身酷 2021-02-07 00:46

I\'m fairly new in Elm. It\'s interesting to see a functional language which allows you to develop front-end stuff. Now even if I am following the steps described here nicely, I

相关标签:
1条回答
  • 2021-02-07 01:16

    Update for Elm 0.17

    In 0.17, the Html package has been moved to elm-lang/html. Run the following command from the terminal to install it:

    elm package install elm-lang/html
    

    You should also remove the evancz/elm-html package from elm-package.json because it no longer exists as of 0.17.

    For more information about the upgrading from 0.16 to 0.17, please see the 0.17 announcement.

    Original Answer for Elm 0.16

    Your elm-package.json configuration is missing the evancz/elm-html package, which exposes Html. You can use elm's package manager to install dependencies rather than editing elm-package.json directly.

    From the terminal, type the following:

    elm package install evancz/elm-html
    

    You will also be prompted to install a few other missing dependencies required by evancz/elm-html. Running this command will update your elm-package.json file as well as pull down the missing packages from the internet and install them in the standard elm-stuff/packages directory.

    More info on the elm-package tool can be found here.

    You can browse elm packages online at package.elm-lang.org. The sidebar has a Popular Packages section which contains the evancz/elm-html package mentioned here.

    0 讨论(0)
提交回复
热议问题