royriojas / esformatter-jsx

esformatter plugin: format jsx files (or js files with Facebook React JSX Syntax)
MIT License
142 stars 25 forks source link

"error: The formatting failed please check the console for more details." #112

Closed Orpheusown closed 6 years ago

Orpheusown commented 6 years ago

I have install the plugin with the guide of wiki, but after all I meet the problem, here is the output:

error: The formatting failed please check the console for more details.

JSFMT ==>
[Errno 32] Broken pipe

I was thought it was occur by the wrong node path, I have try to reset the path with some different expression, like /c/Program Files/nodejs/node.exe, C:/Program Files/nodejs/node.exe or \"C:/Program Files/nodejs/node.exe\" but all of it doesn't work I'm not sure, there may be the error origin? when I input npm ls esformatter, the output is

+-- esformatter@0.10.0
`-- jsfmt@0.5.3
  `-- esformatter@0.10.0  deduped

I don't know which is wrong

royriojas commented 6 years ago

hi @Orpheusown

are you following this guide? https://github.com/royriojas/esformatter-jsx/wiki/Usage-with-jsfmt

To be honest lately I haven't been using much esformatter-jsx, the project I'm currently working is using prettier and hence I haven't touch this project for a while.

I can still try to dig into why this is not working for you, but maybe using prettier will be easier for you https://prettier.io/, it is currently being used in big projects like react so this might be helpful for your use case too.