Gotten error TypeError: Cannot read property 'apply' of undefined
at node_modules/promise-mysql/lib/helper.js:16:24
at Promise._execute (node_modules/bluebird/js/release/debuggability.js:303:9)
at Promise._resolveFromExecutor (node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (node_modules/bluebird/js/release/promise.js:79:10)
at promiseCallback (node_modules/promise-mysql/lib/helper.js:6:10)
at pool.query (node_modules/promise-mysql/lib/pool.js:22:28)
Instead of calling
connection.query(...)
, I want to simplify the syntax to:But it's giving an error:
Is there any way to fix this?