-
Notifications
You must be signed in to change notification settings - Fork 140
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
[BUG v5.0.0] TypeError: Cannot convert undefined or null to object
on get
operation
#151
Comments
Whoa sorry for that! Can you elaborate on:
please? package.json:
index.js:
|
Hi @erdii and thanks for answering.
forgot to tell, the error is happening in the server-side rendering of the application, don't know if I disable the SSR |
hm... I feared, that you would try to use node-cache in the browser, but it's dependency on the internal "events" module should make that impossible. But you tried on the server-side and node_modules are excluded from webpack in your config... that should work Can you maybe show me the generated parts of your code? |
I get a similar error when trying to set to null, Node 10.16.3. No webpack, no typescript, node-cache@5.0.0, clone@2.1.2:
The problem disappears if I change line 688 of
to:
|
I also have this problem. Example:
|
Fixed the bug in #152, tests are still running. I'll merge this as soon as they finished and then I'll create a patch release. Thank you all for debugging and reporting this! |
fixed getValLength for null values; this fixes #151; also added a test
v5.0.1 has been released! Thank you again and sorry for the inconvenience :) |
Thank you for the quick fix, and for node-cache! |
With the same code that used to work with v4.x.x:
it returns the error
mind that for sure in the cache there's no value for that key
The text was updated successfully, but these errors were encountered: