Compiler: `elm reactor` not recompiling changes

Created on 2 Sep 2018  路  1Comment  路  Source: elm/compiler

Elm 0.19.0 installed twice - once via npm into ~/.npm-global, once using package installer download linked at https://guide.elm-lang.org/install.html
macOS 10.13.6
Safari browser

To reproduce:

  1. Within an elm project that uses main : Program () Model.Model Msg.Msg with Browser.element at the top level, run elm reactor
  2. Access http://localhost:8000/index.html
  3. Introduce a typo into the program and save it.
  4. See no output on the console running elm reactor
  5. Reload the page in the browser.
  6. See no change in index.html and no output on the console running elm reactor.

Most helpful comment

When you run elm make src/Main.elm it produces a index.html file.

When you use elm reactor it lets you browse files:

  • If it is a .elm file, it will compile it on refresh.
  • If it is a .json file, it just shows it.
  • If it is a .jpg file, it just shows it.
  • If it is a .html file, it just shows it.
  • etc

So if you are just looking at a .html file but not running elm make, no change should happen.

It sounds like you are expecting a different workflow, but this is the one we have right now.

Ask the folks on discourse or slack if you have further difficulties.

>All comments

When you run elm make src/Main.elm it produces a index.html file.

When you use elm reactor it lets you browse files:

  • If it is a .elm file, it will compile it on refresh.
  • If it is a .json file, it just shows it.
  • If it is a .jpg file, it just shows it.
  • If it is a .html file, it just shows it.
  • etc

So if you are just looking at a .html file but not running elm make, no change should happen.

It sounds like you are expecting a different workflow, but this is the one we have right now.

Ask the folks on discourse or slack if you have further difficulties.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kuon picture kuon  路  3Comments

torepettersen picture torepettersen  路  4Comments

lmmarsano picture lmmarsano  路  4Comments

maxsnew picture maxsnew  路  3Comments

evancz picture evancz  路  4Comments