.asCallback is not a function
See original GitHub issueEnvironment
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:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think we should add link to that document near to changelogs to documentation page. I didn’t see any mentions about it there.
@elhigu Good idea, will do.