Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It looks like esformatter is not installed. Please make sure that it is installed globally or in project node_modules folder #75

Open
BennyTian opened this issue Mar 8, 2017 · 7 comments

Comments

@BennyTian
Copy link

installed esformater :
npm install -g esformatter

execute command:
esformatter --help

result:
`Usage: esformatter [options] [files...]

Options:
-v, --version Display the current version.
-h, --help Display help and usage details.
-c, --config Path to custom configuration file.
-p, --preset Set style guide preset ("jquery", "default").
--plugins Comma separated list of plugins.
-i Edit input files in place; use with care!
--diff Check code style and output char diff.
--diff-unified Check code style and output unified diff.
--no-color Remove colors from diff (default if terminal doesn't
support colors).
--color Force colored diffs even if terminal doesn't support it.`

but sublime text(3) alert:

It looks like esformatter is not installed. Please make sure that it is installed globally or in project node_modules folder

@piuccio
Copy link
Owner

piuccio commented Mar 9, 2017

are you using nvm? which OS?

@BennyTian
Copy link
Author

BennyTian commented Mar 9, 2017

macos 10.12.3
npm 3.3.12
node v5.3.0
Python 2.7.10

node installed with tar.gz . and confing NODE_HOME ...

@piuccio
Copy link
Owner

piuccio commented Mar 9, 2017

Python 2.7 means Sublime2, I believe this plugin might work better in Sublime3.

Anyway, in both cases you can try setting the esformatter_path in the config

"esformatter_path": null,

point it to your global installation of esformatter, it might do the trick

@maikelmclauflin
Copy link

the above did not seem to work. neither setting the path to null nor to the path of the globally installed npm package

@piuccio
Copy link
Owner

piuccio commented Oct 21, 2018

Did you install it with nvm or yarn? I don't use sublime anymore, I don't know how to debug this

@maikelmclauflin
Copy link

i installed with npm, tried brew as well to see if linking differently. how does one use nvm? that's a node version manager

@piuccio
Copy link
Owner

piuccio commented Oct 23, 2018

I had a quick look at the code, the plugin tries to run node esformatter --version to verify that the command works. First it tries to use a local version, so you might try npm install esformatter in your project and reset your config.

It also relies on node to work, so you might want to check your PATH variable.

In any case, both this plugin and esformatter are kinda inactive (last commit on esformatter is more than 1 year ago). You might have better luck with prettier maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants