3rd-Eden / node-hashring

hashring is a consistent hashing algorithm for Node.js that is compatible with libketama and python's hash_ring package
MIT License
350 stars 61 forks source link

Error when checking in memcached module #24

Closed nzakas closed 8 years ago

nzakas commented 9 years ago

I've been working on a project using the memcached module (v2.0.0) and have been running into problems with hashring. We check our node_modules folder into git, and for some reason, whatever build artifacts are created when hashring is built do not end up in node_modules. The result is that anyone who clones the repo is met with a "cannot find binding" error for hashring when they try running the project (all developers have the exact same dev-vm setup).

When we used a previous version of the memcached module (0.2.8), this setup worked fine.

Is this something that can be fixed?

3rd-Eden commented 9 years ago

This module requires a binary binding in order to function properly. As you check your modules in to git you need to do a npm rebuild after checking out in order to have the binary addon be rebuilded for the correct platform.

It's unfortunetly not possible to do create a proper hashring without a binary addon as it requires 64bit bitshifting.

nzakas commented 9 years ago

Everyone's VMs here are exactly the same, so needing to rebuild after every check out should be an unnecessary step. I'm not familiar with compiled modules, but I'm assuming there's some sort of built artifact that exists and can be checked in somewhere? Or is that just not how it works?

3rd-Eden commented 8 years ago

Resolved in latest release.