humio / atom-elm-format

Run elm-format in atom
https://atom.io/packages/elm-format
Apache License 2.0
10 stars 8 forks source link

Default elm-format binary path is not suitable for Windows #7

Closed avh4 closed 7 years ago

avh4 commented 8 years ago

The default appears to be /usr/local/bin/elm-format, which is okay for mac/linux. But on Windows, I think the default should probably just be elm-format so that it will be found if it's on the PATH.

Also, the error message when this happens is misleading: it says "elm-format exited with code 1", but actually elm-format was not found at all.

benjick commented 8 years ago

I have a solution for this, but I need to find a Windows box to test it.

@emandres what do you put in your binary path for elm-format?

emandres commented 8 years ago

I have a ~\bin folder in my home directory that is on my PATH. That's where I put the elm-format.exe file.

avh4 commented 8 years ago

I use vagrant init opentable/win-2012r2-standard-amd64-nocm && vagrant up for windows testing

vladknp commented 7 years ago

Same problem. I use win7

Eeveline commented 7 years ago

For anyone with this question, and my future self: I fixed this by inputting the exact path to the elm-format.exe. In my case it is: C:/Program Files (x86)/Elm Platform/0.18/bin/elm-format.exe

Works perfect after doing this!

DavidLGoldberg commented 7 years ago

Thanks @Eeveline! ... I gave the platform install a try and this worked (as opposed to npm) for others I had to get the elm-format from https://github.com/avh4/elm-format/releases/ and copy it into the platform bin.

AionDev commented 7 years ago

@Eeveline 's comment helped me here ( thank you 😄 ) - but if that doesn't work make sure you got all this steps right. valid for windows people still struggling with this: 👉 step1: apm install elm-format 👉 step2: then make sure you have Elm Platform installed from here. 👉 step3: make sure you unzipped the elm-format executable from here - and place it inside the same folder as the Elm Platform installation - you can see it in the path below. 👉 step4: include C:/Program Files (x86)/Elm Platform/0.18/bin/elm-format.exe path in the box of elm-format package - inside the Atom UI - Settings tab as you can see below.

atom error elm-format exited with code null - how to fix this error in windows 10

benjick commented 7 years ago

Great summary. Feel free to add to the Readme :)

On 19 May 2017 17:34, "Aion-github" notifications@github.com wrote:

@Eveline https://github.com/eveline 's comment helped me here ( thank you 😄 ) - but if that doesn't work make sure you got all this steps right. valid for windows people still struggling with this: 👉 step1: apm install elm-format 👉 step2: then make sure you have Elm Platform installed from here https://github.com/elm-lang/elm-platform. 👉 step3: make sure you unzipped the elm-format executable from here https://github.com/avh4/elm-format/releases/tag/0.7.0-exp - and place it inside the same folder as the Elm Platform installation - you can see it in the path below. 👉 step4: include C:/Program Files (x86)/Elm Platform/0.18/bin/elm-format. exe path in the box of elm-format package - inside the Atom UI - Settings tab as you can see below.

[image: atom error elm-format exited with code null - how to fix this error in windows 10] https://cloud.githubusercontent.com/assets/20288140/26254054/f634c298-3cbd-11e7-919e-b76436bde606.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/triforkse/atom-elm-format/issues/7#issuecomment-302736044, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaTGOr-dVRLbNUAKrrNG4THBJ0AJIOlks5r7badgaJpZM4Ie84f .