Skip to content

How to Startup? #3

Description

@AviFS

This is as much a question on how to start it up as an issue. Perhaps you could clarify in the README for those of us not familiar with Elm?

This all takes place on a Mac.

What I did:

  • Deleted everything related to Elm for a clean start
  • Ran npm install -g elm@0.18 to install Elm 0.18
    • See Elm 0.18
  • Ran npm install -g elm-live to install Elm-Live
    • See Elm Live
  • Ran the three following commands in succession:
    • elm make src/Main.elm --output=build/main.js
    • elm package install
    • elm live src/Main.elm --open -- --output=build/main.js --debug
      • See Running
  • Blank page for http://localhost:8000 opens
    • See Final Note

Elm 0.18: I assume that you're using Elm 0.18, based on /elm-stuff/build-artifacts/0.18.0 folder's name and elm package install being in Makefile, was deprecated in 0.19. It also doesn't run with with 0.19 anyway, giving elm package install | There is no package command.

Elm Live: According to the site, elm-live.com, one should run npm install elm-live@prev --save-dev to install it for Elm 0.18. However, this makes a file called elm-live (alias) and then errors upon opening in Finder with a pop-up: The operation can’t be completed because the original item for “elm-live” can’t be found. That's some weird Mac/Elm-Live/Elm 0.18 issue, not yours. But couldn't find a solution online. Just letting you know in case installing elm-live instead of elm-live@prev could be the issue!

Running: As I understand, make install run simply runs ./Makefile, which runs the first two lines above and finally elm live src/Main.elm --output=build/main.js --open --debug. However, that last line errors saying -- Output In Wrong Location*. And indeed, according to the section on flags in elm-live.com both it and debug are in the wrong spot. So I re-organized the flags as I understand they should be: elm live src/Main.elm --open -- --output=build/main.js --debug

Final Note: Again, this was my first exposure to Elm, which I'm really intrigued by now! (Not due to this mess, but based on their try & tutorial pages.) Anyway, so after a bit over an hour of googling and tinkering, esp. since installing Elm installed 0.19, didn't install elm-live and didn't teach me how to use the elm live flags, this was the closest I was able to come to starting it up.

*Full error message continues: You have used the elm make flag --output in the wrong location. As seen in the usage example about, all elm make flags must be added to your command after the -- separator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions