Getting Error: spawn ENOENT
Created by: alexduan
htmltidy: 0.0.6 NodeJS: 0.10.13 Ubuntu: 13.04
Using coffeescript:
tidy = require('htmltidy').tidy
text = '<table><tr><td>badly formatted html</tr>'
tidy text, (err, html) ->
if err then console.log err
console.log html
Getting the following error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
Imported comments:
By ohfang on 2013-11-29 08:06:13 UTC
I got the same error
By aslikeyou on 2014-03-31 16:26:56 UTC
the same
By josuecau on 2014-07-25 09:19:59 UTC
the same, on Debian Wheezy (works on Mac OS X)
By gavinballard on 2014-11-08 14:56:07 UTC
Is this project maintained any more / is this issue likely to get a fix? I'm starting to dig in to this to see if I can come up with a resolution but it would be good to know if a better solution would just be to swap to a different node library.
By gavinballard on 2014-11-10 12:16:07 UTC
I've tracked down the cause of this issue (htmltidy using 32-bit binaries on 64-bit systems). The following should resolve this issue:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
By anodynos on 2014-11-10 16:53:13 UTC
Just lost a few good hours of work cause of this, while trying to run on travis. Thanks for the update
By DavidZey on 2014-11-20 16:46:13 UTC
Same issue. Took me a good hour before seeing this post. Thanks for the fix.
By anodynos on 2014-11-21 10:03:51 UTC
Still useless to use it on a distribution lib - the end users won't know what's wrong. Could we perhaps detect the runtime and inform the user and just bypass instead of crushing ?
By gavinballard on 2014-11-21 10:19:54 UTC
@anodynos I don't think this would actually be too difficult a problem to solve, but with the last commit by @vavere over a year and a half ago, I'm not sure that any PR fixing it is going to get merged and deployed in an updated npm package. Otherwise, I'd be happy to take a stab at fixing this.
By anodynos on 2014-11-25 03:43:55 UTC
That would be good.. perhaps the project needs a fork if @vavere is missing in action... Has anyone seen any activity from him lately ? Should we give it a few days ?
** UPDATE ** He's nowhere to be seen for months... so, @gavinballard would you like to fork ?
By gavinballard on 2014-11-25 10:37:58 UTC
I'm reluctant to fork as I have a few other projects I maintain and don't want to inherit another one. I notice that @bnicholas has a recent existing fork which probably solves this issue; might be worth bringing him in on this discussion.
By calvinalvin on 2015-02-13 03:01:34 UTC
just wanted to confirm that installing libc6:i386 libncurses5:i386 libstdc++6:i386 libraries from a 64bit ubuntu env seems to fix the issue.
+1 for 64bit fork
By hampsterx on 2015-04-29 21:40:40 UTC
+1 wasted half hr on this, :(