The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

274817 (1) [Avatar] Offline
#1
$ elm-make PhotoGroove.elm --output elm.js
When compiling PhotoGroove.elm (listing 5.7) I got the following error
==
I cannot find module 'Slider'.

Module 'PhotoGroove' 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

== my action

remove
import Slider exposing (paperSlider)

== another compile
Got the following errors
==
-- NAMING ERROR ------------------------------------------------ PhotoGroove.elm

Cannot find variable `Slider.onImmediateValueChange`.

63| , paperSlider [ Attr.max "11", Slider.onImmediateValueChange toMsg ] []
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
No module called `Slider` has been imported.

-- NAMING ERROR ------------------------------------------------ PhotoGroove.elm

Cannot find variable `at`

288| at [ "target", "immediateValue" ] int
^^
Maybe you want one of the following?

a
dt
rt
Json.Decode.at

-- NAMING ERROR ------------------------------------------------ PhotoGroove.elm

Cannot find variable `on`

290| |> on "immediate-value-changed"
^^
Maybe you want one of the following?

ol
Html.Events.on
Html.ol

Detected errors in 1 module.

== my actions (code changes)

from
import Html.Events exposing (onClick)
to
import Html.Events exposing (onClick, on)

from
import Json.Decode exposing (string, int, list, Decoder)
to
import Json.Decode exposing (string, int, list, Decoder, at)

from
, paperSlider [ Attr.max "11", Slider.onImmediateValueChange toMsg ] []
to
, paperSlider [ Attr.max "11", onImmediateValueChange toMsg ] []

== now it will compile and the app works as expected