Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot redefine property: find (incompatibility with connect-rest) #2

Closed
cperryk opened this issue Jun 12, 2015 · 1 comment
Closed

Comments

@cperryk
Copy link

cperryk commented Jun 12, 2015

I'm noticing that this throws an error if I attempt to require it after requiring connect-rest. To reproduce, run this script:

var rest = require('connect-rest');
var memcached_plus = require('memcache-plus');

Here's the error on my machine:

TypeError: Cannot redefine property: find
    at Function.defineProperty (native)
    at define (/Users/kirkcp/Documents/interactives/express/node_modules/memcache-plus/node_modules/collections/shim-array.js:56:12)
    at Object.<anonymous> (/Users/kirkcp/Documents/interactives/express/node_modules/memcache-plus/node_modules/collections/shim-array.js:135:1)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/kirkcp/Documents/interactives/express/node_modules/memcache-plus/node_modules/collections/generic-collection.js:272:1)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
@victorquinn
Copy link
Owner

victorquinn commented Oct 18, 2016

Turns out this was an issue with the "collections" package and its use of a shim. This was also pointed out in #25

I have updated Memcache Plus to not use the "collections/deque" as the buffering mechanism which should fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants