TypeError: Cannot read property 'Events' of undefined
Closed this issue · 2 comments
leeahoward commented
I have been getting this error in my logs since I started using node-hubspot. I am concerned because I don't know what affect it could be having and I know it is related to the node-hubspot since it is the only library I am using that has a dependency on bottleneck. I also opened an issue with bottleneck SGrondin/bottleneck#168
What is the cause and should I be concerned?
(node:18) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'Events' of undefined
at /app/node_modules/bottleneck/lib/Bottleneck.js:378:18
at Generator.next (<anonymous>)
at asyncGeneratorStep (/app/node_modules/bottleneck/lib/Bottleneck.js:15:103)
at _next (/app/node_modules/bottleneck/lib/Bottleneck.js:17:194)
at /app/node_modules/bottleneck/lib/Bottleneck.js:17:364
at new Promise (<anonymous>)
at /app/node_modules/bottleneck/lib/Bottleneck.js:17:97
at _addToQueue (/app/node_modules/bottleneck/lib/Bottleneck.js:415:9)
at /app/node_modules/bottleneck/lib/Sync.js:39:30
at Generator.next (<anonymous>)
at asyncGeneratorStep (/app/node_modules/bottleneck/lib/Sync.js:3:103)
at _next (/app/node_modules/bottleneck/lib/Sync.js:5:194)
at /app/node_modules/bottleneck/lib/Sync.js:5:364
at new Promise (<anonymous>)
at /app/node_modules/bottleneck/lib/Sync.js:5:97
at /app/node_modules/bottleneck/lib/Sync.js:49:11
at Generator.next (<anonymous>)
at asyncGeneratorStep (/app/node_modules/bottleneck/lib/Sync.js:3:103)
at _next (/app/node_modules/bottleneck/lib/Sync.js:5:194)
at /app/node_modules/bottleneck/lib/Sync.js:5:364
at new Promise (<anonymous>)
at /app/node_modules/bottleneck/lib/Sync.js:5:97
(node:18) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 114)
leeahoward commented
Is anyone there?
leeahoward commented
Looks like this was my error. I was using nodecache to cache the api client and apparently nodecache uses a clone by default.