kevva / elm-bin

elm-platform bin-wrapper that makes it seamlessly available as a local dependency
MIT License
18 stars 5 forks source link

ELM_HOME not set by npm install -g elm #13

Closed rtfeldman closed 9 years ago

rtfeldman commented 9 years ago

This causes the symptom that if you do npm install -g elm and then run elm-reactor, it 500s when attempting to fetch resources, with the following message:

A web handler threw an exception. Details:
user error (Unable to find the ELM_HOME environment variable when searching
for the _reactor/debug.js file.

If you installed Elm Platform with the Mac or Windows installer, it looks like
ELM_HOME was not set automatically. Look up how to set environment variables
on your platform and set ELM_HOME to the directory that contains Elm's static
files:

  * On Mac it is /usr/local/share/elm
  * On Windows it is one of the following:
      C:/Program Files/Elm Platform/0.15/share
      C:/Program Files (x86)/Elm Platform/0.15/share

If it seems like a more complex issue, please report it here:
    <https://github.com/elm-lang/elm-platform/issues>
)

After uninstalling the npm version and using the Mac installer, it worked as expected.

jvoigtlaender commented 9 years ago

@rtfeldman, see https://github.com/kevva/elm-bin/issues/7, currently the resource files are not part of the npm installer, so there is nowhere useful that ELM_HOME could be pointing to.

jvoigtlaender commented 9 years ago

Richard, the resource files are now part of the npm install, and I filed a PR (https://github.com/elm-lang/elm-compiler/pull/945) via the compiler to improve the message you saw above.

passy commented 9 years ago

Thanks everyone!