easy-captcha not compatible with NodeJS 0.12.x

So, in one of our recent projects, easy-captcha was chosen to handle captcha image verification for a NodeJS Express web app. Everything was fine until I wanted to upgrade to Node 0.12.x, for which easy-captcha fails to compile. What’s worse, the library doesn’t seem to be actively maintained anymore; in fact, it’s 2 years long since its latest release on the npmjs platform.

While we could have switched to another captcha solution, extremely tight constraints on time and resources didn’t allow us that freedom. As the result, I decided to tweak the module itself so that it could compile on Node 0.12.x.

The result is this: https://github.com/Thesephi/easy-captcha

And that’s it. easy-captcha now compiles nicely for the new NodeJS. I also created a pull request in case the easy-captcha author considers upgrading the module himself. Meanwhile, you can point your corresponding package.json entry to the repo above, and npm will install easy-captcha from that specific repo rather than the one on npmjs.org.

Side note 1: if you’re on a Mac, you may encounter the “lib X11 not found” error while compiling easy-captcha, in which case this stackoverflow thread is a good read.

Side note 2: kudos to the CCAP module author, on which easy-captcha was based. While documentations are scarce, especially English ones, it’s thanks to them we could complete the tweak.

Side note 3: while I was at it, I threw into the lib the latest version of the CImg library for our convenience.

Cheers,

One thought on “easy-captcha not compatible with NodeJS 0.12.x

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s