Elm.tmLanguage icon indicating copy to clipboard operation
Elm.tmLanguage copied to clipboard

Cannot find elm-make from npm install

Open rtfeldman opened this issue 9 years ago • 12 comments

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?

rtfeldman avatar Sep 09 '15 11:09 rtfeldman

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.

texastoland avatar Sep 09 '15 15:09 texastoland

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.

deadfoxygrandpa avatar Sep 10 '15 14:09 deadfoxygrandpa

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

texastoland avatar Sep 10 '15 16:09 texastoland

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

rtfeldman avatar Sep 10 '15 16:09 rtfeldman

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.

rtfeldman avatar Sep 21 '15 15:09 rtfeldman

Going through a move but high on my list!!

texastoland avatar Sep 22 '15 00:09 texastoland

@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?

texastoland avatar Nov 27 '15 15:11 texastoland

@rtfeldman Are you still experiencing this?

deadfoxygrandpa avatar Dec 13 '15 17:12 deadfoxygrandpa

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

rtfeldman avatar Dec 13 '15 23:12 rtfeldman

@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.

deadfoxygrandpa avatar Dec 25 '15 09:12 deadfoxygrandpa

Awesome, please do! :D

On Fri, Dec 25, 2015, 1:00 AM Alex Neslusan [email protected] 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 .

rtfeldman avatar Dec 26 '15 18:12 rtfeldman

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?

DaveSanders avatar Jan 01 '17 19:01 DaveSanders