deadfoxygrandpa / Elm.tmLanguage

Elm language syntax highlighting and tool integration for ST2/3
https://packagecontrol.io/packages/Elm%20Language%20Support
MIT License
122 stars 27 forks source link

Cannot find elm-make from npm install #48

Open rtfeldman opened 9 years ago

rtfeldman commented 9 years ago

Just tried the beta and got:

[Errno 2] No such file or directory: 'elm-make'
[cmd: ['elm-make', '/Users/rtfeldman/code/elm-effects/src/Effects.elm', '--output=/dev/null', '--report=json', '--yes']]
[dir: /Users/rtfeldman/code/elm-effects]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
[Finished]

This makes sense, considering it was only looking in /usr/bin:/bin:/usr/sbin:/sbin and given:

$ which elm-make
/usr/local/bin/elm-make

It would appear https://github.com/deadfoxygrandpa/Elm.tmLanguage/blob/master/Build%20Systems/Elm%20Make.sublime-build#L18-L21 is being ignored somehow?

texastoland commented 9 years ago

Ah I forgot I replaced that with a elm_bin_dir setting inspired by the CoffeeScript package in https://github.com/dnalot/sublime-langauge-elm/commit/ca4c22074171e117d7a59f24c435cd77c76fe741.

The issue was Elm Make (or anything else depending on this hack) expanded PATH recursively i.e. 100 compiles would result in 100 /usr/local/bins prepended to PATH. It was mostly just annoying for debugging. Potential usability fixes include:

  1. Document or even prompt about the setting or another package called Fix Mac Path.
  2. Default setting to /usr/local/bin on OS X. Where does the standalone installer link?
  3. Find a tricky way to set PATH non-recursively.
  4. Stop being OCD and revert what we had because it "just worked."

Even though it works as designed it shouldn't degrade DX (dev exp). Thanks @rtfeldman CC @deadfoxygrandpa.

deadfoxygrandpa commented 9 years ago

Do you mean reverting back to my hacky way to fix the build command? If so, I'm ok with doing that even though it feels less elegant.

texastoland commented 9 years ago

:+1: I'll revisit next beta. @rtfeldman Workaround in the meantime is elm_bin_dir setting.

rtfeldman commented 9 years ago

Gotcha, thanks! +1 to reverting for the next round...at least in my experience, that approach worked fine.

rtfeldman commented 8 years ago

For what it's worth, I tried setting elm_bin_dir to /usr/local/bin and it errored out. I went back to the old Elm Build configuration to get things working again.

texastoland commented 8 years ago

Going through a move but high on my list!!

texastoland commented 8 years ago

@rtfeldman Just got finished with moving and new job stuff. Are you still interested in this? I can help finish the PR through but I've fully transitioned stacks (including editors) and think @deadfoxygrandpa has lost momentum too. Would you ask around for interested contributors?

deadfoxygrandpa commented 8 years ago

@rtfeldman Are you still experiencing this?

rtfeldman commented 8 years ago

I still get this on the beta:

Running elm-make /Users/rtfeldman/code/NoRedInk/app/assets/javascripts/Quiz/Question.elm --output=/dev/null --report=json --yes
error: Error loading syntax file "Packages/sublime-language-elm/Syntaxes/Elm Compile Messages.hidden-tmLanguage": Unable to open Packages/sublime-language-elm/Syntaxes/Elm Compile Messages.hidden-tmLanguage
deadfoxygrandpa commented 8 years ago

@rtfeldman I'm creating a new way to distribute beta versions, by adding a custom repository to Package Control which overrides the normal Elm Language Support package to point at the beta branch instead. It should fix some of these beta-only issues.

Right now the public release is ahead of the previous beta release, but once I have a new beta version ready I'll let you know.

rtfeldman commented 8 years ago

Awesome, please do! :D

On Fri, Dec 25, 2015, 1:00 AM Alex Neslusan notifications@github.com wrote:

@rtfeldman https://github.com/rtfeldman I'm creating a new way to distribute beta versions, by adding a custom repository to Package Control which overrides the normal Elm Language Support package to point at the beta branch instead. It should fix some of these beta-only issues.

Right now the public release is ahead of the previous beta release, but once I have a new beta version ready I'll let you know.

— Reply to this email directly or view it on GitHub https://github.com/deadfoxygrandpa/Elm.tmLanguage/issues/48#issuecomment-167211881 .

DaveSanders commented 7 years ago

I'm having a similar issue today. npm installed elm, and am getting the "[Errno 2] No such file or directory: 'elm-make'" error on a build.

I have updated my user preferences to include the path to the elm bins (elm-oracle and elm-format are working), but elm-make is not... Any tips?