elm-format-on-save icon indicating copy to clipboard operation
elm-format-on-save copied to clipboard

Add quit and relaunch Sublime to Troubleshooting and/or Install section of Readme

Open rdela opened this issue 6 years ago • 0 comments

After installing Elm Format on Save, I immediately saw the ELM-FORMAT NOT FOUND error panel. Reading Troubleshooting, I examined my path in .bash_profile trying to figure out why. My path was more complicated than what the error was listing out.

NOTE: Your PATH variable led me to check in the following directories:

    /usr/bin
    /bin
    /usr/sbin
    /sbin

But I could not find `elm-format` in any of them. Please let me know
at https://github.com/evancz/elm-format-on-save/issues if this does
not seem correct!

I use nvm to manage Node.js versions. I tried setting the correct path in Elm Format on Save -> Settings:

{
	"absolute_path": "/Users/USERNAME/.nvm/versions/node/v10.16.3/bin/elm-format"
}

After I set that, the error on activating the keyboard shortcut or saving changed to:

env: node: No such file or directory

Commenting it out brought back the ELM-FORMAT NOT FOUND error. At this point I was very close to following the advice of step 3 in Troubleshooting and uninstalling Elm Format on Save. On a lark, I decided to quit and relaunch Sublime to see if that made a difference. At that point Elm Format on Save started working. I commented out the absolute_path I had set in Elm Format on Save -> Settings and again Elm Format on Save kept working, even after quitting and restarting Sublime.

This leads me to conclude quitting and restarting Sublime was the fix, and unless something suggests otherwise to you, I think it should definitely be added high up on Troubleshooting, maybe even at the top. Also might be worth adding a sentence to the end of Install section of Readme suggesting to try quitting and relaunching Sublime after install and/or linking "troubleshooting advice" like so:

You may see a panel open with troubleshooting advice if something has gone wrong! If you see this panel you can also try quitting and relaunching Sublime Text before following the troubleshooting steps.

rdela avatar Sep 30 '19 23:09 rdela