Closed ghost closed 8 years ago
is that path in your PATH
? can you run esformatter --version
from the terminal? Which OS are you using?
is that path in your PATH?
Yes.
can you run esformatter --version from the terminal?
esformatter v0.9.5
Which OS are you using?
OS X 10.11.5
Are you using nvm? I had problems with it, I didn't really need it so I removed it.
No, Node is at /usr/local/bin
,
Could you paste here your EsFormatter.sublime-settings ?
EsFormatter.sublime-settings
{
"format_on_save": false,
"esformatter_path": "/Users/cbloodworth/.npm-packages/lib/node_modules/esformatter/bin/esformatter",
"esformatter_config_file": ["/Users/cbloodworth/.esformatter"]
}
If I change esformatter_path
to null
, I get "It looks like esformatter is not installed...".
$PATH /Users/cbloodworth/.npm-packages/bin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/fzf/bin:/Users/cbloodworth/n/bin
Node version is 6.2.1. I've also tried 6.0.0.
I think you need to keep it to null as you have esformatter installed globally. I'm on ubuntu but maybe the plugin works differently on OS X? The version 2.0.0 of this plugin doesn't handle unix paths (with /). Piuccio merged my PR to fix this.
Maybe you could try to update the package to the version 2.0.1? I don't know if the package manager is already up-to-date so you might have to do it manually.
I just updated. 2.0.1 fixed this :)
I'm afraid this issue has returned. I can't think of anything that has changed, apart from restarting Sublime.
That's strange, can you double check the version of the plug-in installed? Maybe restarting sublime did something to the config... Did you try to restart sublime or maybe delete the cache?
It is strange. I checked and I'm on 2.0.1. I also cleared Sublime's Packages directory and reinstalled everything, as well as restarted Sublime a few times, but the issue persists.
I think there is a few other places in the plugin that need to be changed to support UNIX paths. Maybe you could fix them and submit a PR? This way https://github.com/piuccio/sublime-esformatter/commit/e094749aff59850787029047bca588d31f2a318d
This could fix your problem... I can't reproduce the problem on Linux so I don't know what else you could try apart from this.
I receive the following error upon formatting: "Error (1):[Errno 2] No such file or directory: 'esformatter'. "