yasuyk / web-beautify

Format HTML, CSS and JavaScript/JSON by js-beautify
GNU General Public License v3.0
219 stars 21 forks source link

"Could not apply web-beautify. See *Web Beautify Errors* to for details." #21

Closed MatMercer closed 7 years ago

MatMercer commented 8 years ago

Hi, I installed this package using the package manager and when I key-bind it to C-b c it displays a message and doesn't work!

I don't know what is causing it and the Web Beautify Errors buffer is empty!

I've installed js-beautify with NPM already.

andrew-kennedy commented 8 years ago

I have this same problem. Js-beautify works on its own when run against the file through terminal. The error buffer is empty for me as well.

MatMercer commented 8 years ago

Now, after trying to make it work, calling the package deletes all the characters in the current Js file.

vspinu commented 7 years ago

Same errors here with "/usr/bin/env: ‘node’: No such file or directory" in the error buffer. Fixed by installing nodejs-legacy package. The executable should be nodejs I would guess.

yasuyk commented 7 years ago

@MrAnyone @andrew-kennedy Sorry for the late reply. If you still interested in this issue, let me know following the information.

MatMercer commented 7 years ago

Since I changed my setup in the mean time, the only information I can give you is that:

Thanks for the response, good luck solving this problem!

yasuyk commented 7 years ago

@MrAnyone Thank you for the response. Could you let me know node version and js-beautify version?

MatMercer commented 7 years ago

Ok, it may not be 100% accurate, since I stopped using it ~2 months ago

I didn't noticed any update from nodejs so probably it is still in the same version.

MatMercer commented 7 years ago

There is a "trick" where you create a symlink to fix the nodejs name.

sudo ln -s /usr/bin/nodejs /usr/bin/node

This may fix the problem.

yasuyk commented 7 years ago

@MatMercer @vspinu @andrew-kennedy It seems a problem of nodejs package. See nodejs/node-v0.x-archive#3911.

MatMercer commented 7 years ago

@yasuyk I thought so, at the time I didn't came out with this solution but it should fix the problem. I'm closing this issue for now, since making a symlink should fix the problem.

Thanks for all the support.

yasuyk commented 7 years ago

@MatMercer You’re welcome.