They work in the live editor on elm-lang.org. But not locally.
Maybe my environment isn't set up correctly?
I tried the first one (the counter). Copy/pasted directly into a dir as 'counter.elm'. Initialized the dir with 'elm package install' to get the core library.
$ elm make counter.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
Edit/update: source-directories is ["."] in elm-package.json. Dependency "elm-lang/core": "4.0.1 <= v < 5.0.0" is in elm-package.json. elm-version is "0.17.0 <= v < 0.18.0". elm-make is elm-make 0.17 (Elm Platform 0.17.0).
macbook:elm-learning me$ which elm
/usr/local/bin/elm
Edit2: so, I then guessed that Html wasn't a part of the core lib, and tried to install evancz/html, but apparently that doesn't work with 0.17 (I get an error about version constraints). I'm guessing the elm-lang.org editor doesn't use 0.17?
Got the same issue initially. The guide does not document the additional packages that needs to be installed. You need to install elm-lang/html package.
Maybe my environment isn't set up correctly?
I tried the first one (the counter). Copy/pasted directly into a dir as 'counter.elm'. Initialized the dir with 'elm package install' to get the core library.
Edit/update: source-directories is ["."] in elm-package.json. Dependency "elm-lang/core": "4.0.1 <= v < 5.0.0" is in elm-package.json. elm-version is "0.17.0 <= v < 0.18.0". elm-make is elm-make 0.17 (Elm Platform 0.17.0).core is installed in elm-stuff/packages:
additionally, Edit2: so, I then guessed that Html wasn't a part of the core lib, and tried to install evancz/html, but apparently that doesn't work with 0.17 (I get an error about version constraints). I'm guessing the elm-lang.org editor doesn't use 0.17?