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

Can't start connection (windows) (lt 0.81) (elm-light 0.4.2) #31

Closed zakaluka closed 8 years ago

zakaluka commented 8 years ago

Hi I am receiving the following error when trying to start a connection:

cljs
%5CUsers%5CSVShah%5CAppData%5CRoaming%5CLightTable%5Cplugins%5Celm_light%5Celm-light_compiled.js[17068]:    
out: error starting repl
%5CUsers%5CSVShah%5CAppData%5CRoaming%5CLightTable%5Cplugins%5Celm_light%5Celm-light_compiled.js[17068]:    
out: { [Error: spawn elm-repl ENOENT]
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn elm-repl',
  path: 'elm-repl',
  spawnargs: 
   [ '--interpreter',
     'C:\\Users\\SVShah\\Downloads\\programs\\lighttable-0.8.1-windows\\LightTable.exe' ] }

Here is my (truncated) output of checking the PATH from within lighttable. The important part being that the last entry in the PATH is the directory for elm-repl (and other elm utilities).

WARNING: unsigned-bit-shift-right already refers to: #'clojure.core/unsigned-bit-shift-right in namespace: cljs.core, being replaced by: #'cljs.core/unsigned-bit-shift-right
user.cljs[eval1][33]:   
...;C:\Users\SVShah\AppData\Local\atom\bin;C:\Users\SVShah\AppData\Roaming\npm

When I execute where elm-repl on the windows command-line, I get:

C:\Users\SVShah>where elm-repl
C:\Users\SVShah\AppData\Roaming\npm\elm-repl
C:\Users\SVShah\AppData\Roaming\npm\elm-repl.cmd

Any thoughts on how to fix this? (I apologize in advance if this is a very rudimentary question). I saw a similar issue, #17, but it was closed without resolution.

rundis commented 8 years ago

I think the issue is that elm-light doesn't play nice with an npm installed version of Elm (in particular the .cmd files needs to be special case handled in node). Short story, could you try installing Elm using the installable distribution https://guide.elm-lang.org/get_started.html#install ?

zakaluka commented 8 years ago

I uninstalled the npm version and installed the distribution from the link. That fixed the problem. Thank you.