question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.asCallback is not a function

See original GitHub issue

Environment

Knex version: 0.20.11, was not present in 0.20.10 Database + version: mariadb OS: ubuntu16

Bug

(node:1505) UnhandledPromiseRejectionWarning: TypeError: self.knex.select(…).from(…).where(…).andWhereRaw(…).then(…).asCallback is not a function at /home/shodan/shodan/node_modules/connect-session-knex/index.js:264:5 at processTicksAndRejections (internal/process/task_queues.js:93:5)

Seems like bluebird was replaced with native promises somewhere, and asCallback was lost.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
elhigucommented, Mar 12, 2020

I think we should add link to that document near to changelogs to documentation page. I didn’t see any mentions about it there.

0reactions
kibertoadcommented, Mar 19, 2020

@elhigu Good idea, will do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

asCallback - Bluebird JS
If the callback argument is not a function, this method does not do anything. This can be used to create APIs that both...
Read more >
Javascript: TypeError: callback is not a function - Stack Overflow
I just want to know why it works in the one sample, but not the other. ... passes a function which gets invoked...
Read more >
TypeError: callback is not a function in JavaScript | bobbyhadz
The "callback is not a function" error occurs when we define a `callback` parameter to a function, but invoke the function without passing...
Read more >
ascallback - npm
Use bluebird 's promise.asCallback(callback) (aka .nodeify ) method as a function to convert non-bluebird promises to node style callbacks.
Read more >
How to use asCallback function in Bluebird - Tabnine
new Promise(function (resolve, reject) { that.verifyCb(token, function (err, data) { if (err) { return reject(err) } resolve(data) }) }).asCallback(cb).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found