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

Error: length of property name should not be greater than 256 [CentOS 7 x64 & Win 10 x64] #13

Open
vsdigitall opened this issue Feb 8, 2018 · 2 comments

Comments

@vsdigitall
Copy link

vsdigitall commented Feb 8, 2018

On both linux and windows 64-bit systems I received the following message when trying:

WIN10 x64:

const binding = require('node-shared-cache')
undefined
obj = new binding.Cache("test", 512 * 1024);
Error: length of property name should not be greater than 256
at formatValue (util.js:423:37)
at Object.inspect (util.js:324:10)
at REPLServer.self.writer (repl.js:365:19)
at finish (repl.js:486:38)
at REPLServer.defaultEval (repl.js:279:5)
at bound (domain.js:301:14)
at REPLServer.runBound [as eval] (domain.js:314:12)
at REPLServer.onLine (repl.js:442:10)
at emitOne (events.js:121:20)
at REPLServer.emit (events.js:211:7)

CentOS 7 x64:

const binding = require('node-shared-cache')
obj = new binding.Cache("test", 512 * 1024);
Error: length of property name should not be greater than 256
at formatValue (util.js:423:37)
at Object.inspect (util.js:324:10)
at REPLServer.self.writer (repl.js:365:19)
at finish (repl.js:486:38)
at REPLServer.defaultEval (repl.js:279:5)
at bound (domain.js:301:14)
at REPLServer.runBound [as eval] (domain.js:314:12)
at REPLServer.onLine (repl.js:442:10)
at emitOne (events.js:121:20)
at REPLServer.emit (events.js:211:7)

Please let me know if it is a bug or I am doing something wrong?

@vsdigitall
Copy link
Author

vsdigitall commented Feb 8, 2018

However if I just igoner errors and try to set 'obj' property to some value it succeeds:

> obj.foo = 1
1
> obj.foo
1

But obj.set property is undefined:

> obj.set
undefined
> binding.set
undefined

NodeJS version: v 8.9.3

@manueltimita
Copy link

It's mentioned in the docs:

"key length should also not be greater than 256"

https://github.com/kyriosli/node-shared-cache#constructor

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