2 ms·
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 d
by warfangle 10y ago
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).
core is installed in elm-stuff/packages:
macbook:core me$ pwd
/Users/me/elm-learning/elm-stuff/packages/elm-lang/core
additionally,
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?
- dywedir 10y agoIn Elm 0.17 use elm-lang/html
- warfangle 10y agoThanks. Kinda amateur hour with leaving that out of the guide. I wonder how many others have gotten as frustrated and stopped trying to learn it! I'll submit a PR to update the docs in a lil bit.
- ocean3 10y agoGot 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.