Hello I just follow the doc from: http://elm-lang.org/get-started but I'm blocked in the finding module part:
$ mkdir elm
$ cd elm
$ elm package install
Some new packages are needed. Here is the upgrade plan.
Install:
elm-lang/core 4.0.1
Do you approve of this plan? (y/n) y
Downloading elm-lang/core
Packages configured successfully!
I get some simple example:
$ wget https://raw.githubusercontent.com/elm-lang/elm-lang.org/master/src/examples/buttons.elm
... Enregistre : «buttons.elm»
buttons.elm 100%[===========================>] 495 --.-KB/s in 0s
2016-05-26 09:32:19 (150 MB/s) - «buttons.elm» enregistré [495/495]
I get a missing module Errror:
$ elm-make buttons.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.json
(venv)luis@spinoza:~/lab/sandbox/elm
$
I can't find where in the documentation is explain the connexion from
import xxx Exposing yyy
And the equivalent of
$ pip install xxx
You need to import the elm-lang/html
package using elm package install elm-lang/html
.
To find out which package you need when you receive such an eror from the compiler, you could go to http://package.elm-lang.org/ and, doing a little search, finding out which package is exposing the module you need by looking in the right column when you are in the details of a package.
For example here you'll see that the elm-lang/html
package is exposing the following modules: Html
, Html.App
, Html.Attributes
, Html.Events
and Html.Lazy
.
There is also an issue asking to improve the connection between the module and the package that is exposing it, so the compiler could help more during project bootstrap
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With