chrisdmacrae / atomic-algolia

An NPM package for running atomic updates to an Algolia indices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: cb is not a function

budparr opened this issue · comments

I get this when running via a local JSON file. The index seems to update, but throws this error.

I believe this is on line 72 update.js

(node:12840) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: cb is not a function
(node:12840) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

fuller error:

/node_modules/atomic-algolia/lib/update.js:72
                        cb(null, res)
                        ^

TypeError: cb is not a function
    at Object.callback (/Users/budparr/code/projects/thenewdynamic.org/thenewdynamic.org/node_modules/atomic-algolia/lib/update.js:72:25)
    at Timeout._onTimeout (/Users/budparr/code/projects/thenewdynamic.org/thenewdynamic.org/node_modules/algoliasearch/src/AlgoliaSearchCore.js:456:21)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

@budparr Is this still an issue?

I was just kicking the tires on things and haven't revisited this since then. You can close this if you like.

@budparr sounds good. 👍

This seems to still be happening. Was this determined to be a user error?