mihai-vlc / sublime-jsfmt

jsfmt plugin for Sublime Text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on Save: "Formatting failed. Check console for details" Native thread-sleep not available

Mestika opened this issue · comments

Some days ago, I started getting this error on save in JavaScript files
screen shot 2016-02-25 at 10 44 00

Looking in the console, I get error:

JSFMT ==>  
Error: Native thread-sleep not available.  
This will result in much slower performance, but it will still work.  
You should re-install spawn-sync or upgrade to the lastest version of node if possible.  
Check /Users/X/Library/Application Support/Sublime Text 3/Packages/jsfmt/node_modules/jsfmt/node_modules/esformatter/node_modules/npm-run/node_modules/spawn-sync/error.log for more details

Unfortunately, there are no error.log file in spawn-sync folder.

The only thing I can do is to disable the jsfmt plugin. Without I cannot save

what version of nodejs do you have locally ?
Can you update to nodejs 4 ?

You were right @ionutvmi. I was running an very old 2014 version of node. I updated to latest stable version 5.6.0 and now everything is up and running smoothly again :-)

Awesome. I will close this issue then.

I was getting the "format failed" error, when checked the console it asked for esformatter-jsx. After installing it, an unexpected token error appears now.

screen shot 2017-01-06 at 11 57 04 am

hi @blnarayanan92 ,

can you share a code snippet that causes that error ?