rundis / elm-light

Elm language plugin for Light Table
https://rundis.gitbooks.io/elm-light-guide/content/
MIT License
133 stars 10 forks source link

[Mac OSX]: Can't start connection #17

Closed Aranir closed 8 years ago

Aranir commented 8 years ago

I tried to follow along the screencast:

Installed elm and light-table through brew.

I started the simple project with:

elm package install

and then added a hello.elm file.

When I try to Add connection -> Elm and select the root of the project I get the following error:

elm-light_compiled.js[9207]:    
out: error starting repl
elm-light_compiled.js[9207]:    
out: { [Error: spawn elm-repl ENOENT]
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn elm-repl',
  path: 'elm-repl',
  spawnargs: 
   [ '--interpreter',
     '/opt/homebrew-cask/Caskroom/lighttable/0.8.1/lighttable-0.8.1-mac/LightTable.app/Contents/Frameworks/Electron Helper.app/Contents/MacOS/Electron Helper' ] }

Any hint what might go wrong?

rundis commented 8 years ago

Hi !

I believe these kind of errors typically comes from some path/file not being found (Light Table is based on Electron which again bundles node and chrome). So I'm guessing Light Table is not able to find the elm-repl executable in path for some reason.

1) can you run elm-repl from the command line ? 2) If yes to 1) let's check the path that LT sees by; a) Add the user plugin to your workspace: On mac that should be in ~/Library/Application\ Support/LightTable/User b) In LT Open the file $User/src/lt/plugins/user.cljs c) Write the following : (.log js/console (.-PATH (.-env js/process))) and press cmd-enter with the cursor at the end of the line (when prompted to select a connection choose LightTable UI) d) check the console (menu -> view -> console) e) Is the directory where elm-repl is installed part of the path logged to the console ?

I've never installed LT and/or elm through brew/cask so I obviously haven't tested that route. If need be I have a spare mac to try it out if we can't figure this out though :-)

tx for the report !

cheers Magnus

rundis commented 8 years ago

@Aranir did you get it working, or did you find time to try out my questions/descriptiopn above ?

rundis commented 8 years ago

Not heard anything back so I'm closing