Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading is not working! #134

Closed
kanuku opened this issue Sep 6, 2018 · 3 comments
Closed

Reloading is not working! #134

kanuku opened this issue Sep 6, 2018 · 3 comments

Comments

@kanuku
Copy link

kanuku commented Sep 6, 2018

I am trying to use elm-live reload, but it does not work!
When I run the command below, the browser does open a window, but it does not serve any file.:

It says simply FILE NOT FOUND!

elm version : 0.19.0
elm-live: 3.0.2-alpha.1

# dir structure

.
|-- elm-stuff
|-- elm.js
|-- elm.json
|-- index.html
|-- node_modules
|-- package-lock.json
|-- src
`-- Main.elm


# I run this command:
elm-live src/Main.elm --open --output=elm.js
[dashboard] elm-live src/Main.elm --open --output=elm.js                                                                                                                                     dashboard  ✭ ✱
Success! Compiled 1 module.

elm-live:
 The build has succeeded. Starting the server! We’ll open your app
 in the default browser as soon as it’s up and running.


Reload web server:
listening on port 8000
monitoring dir /Users/kanuku/Documents/git/elm-workspace/wolf-dashbored/dashboard

Index.html

<!doctype html>
 <link rel="stylesheet" href="style.css" />

 <body>
   <div></div>
   <script src="elm.js"></script>
   <script>Elm.Main.embed(document.querySelector("div"));</script>
 </body>

Elm Application


view : Model -> Html Msg
view model =
    div [ class "uk-container uk-container-center uk-margin-top uk-margin-large-bottom" ]
          [ text "HALLO" ]
...
main =
    Browser.element
        { init = init
        , update = update
        , subscriptions = subscriptions
        , view = view
        }

...
@cllns
Copy link

cllns commented Sep 7, 2018

Not sure if it's a typo but there's an s missing at the end of your command:

elm-live src/Main.elm --open --output=elm.j

@kanuku
Copy link
Author

kanuku commented Sep 7, 2018

It was just a typo! Thanks

@wking-io wking-io closed this as completed Sep 7, 2018
@wking-io
Copy link
Owner

wking-io commented Sep 7, 2018

Glad you figured this out! Thanks @cllns for the assist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants