You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, in the example it shows how to implement the code with callbacks but now that mongoose does not allow queries that way, I use the query so promise as says the documentation of "mongoose-promise" to work properly but I the following error:
I want to know how to write properly used promises Error: express-paginate:pageCountis not a number >= 0 at C:\Users\Oscar\Desktop\OCT\node_modules\express-paginate\index.js:65:13 at C:\Users\Oscar\Desktop\OCT\App\Routes\admin-profesores.js:29:46 at tryCatcher (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\util.js:11:23) at Promise._settlePromiseFromHandler (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:488:31) at Promise._settlePromise (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:545:18) at Promise._settlePromise0 (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:590:10) at Promise._settlePromises (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:673:18) at Promise._fulfill (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:614:18) at Promise._resolveCallback (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:415:57) at Promise._settlePromiseFromHandler (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:501:17) at Promise._settlePromise (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:545:18) at Promise._settlePromise0 (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:590:10) at Promise._settlePromises (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:673:18) at Promise._fulfill (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:614:18) at PropertiesPromiseArray.PromiseArray._resolve (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise_array.js:125:19) at PropertiesPromiseArray._promiseFulfilled (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\props.js:78:14) at Promise._settlePromise (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:550:26) at Promise._settlePromise0 (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:590:10) at Promise._settlePromises (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:673:18) at Async._drainQueue (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\async.js:125:16) at Async._drainQueues (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\async.js:135:10) at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\async.js:16:14) at processImmediate [as _immediateCallback] (timers.js:383:17)
Hello, in the example it shows how to implement the code with callbacks but now that mongoose does not allow queries that way, I use the query so promise as says the documentation of "mongoose-promise" to work properly but I the following error:
I want to know how to write properly used promises
Error: express-paginate:
pageCountis not a number >= 0 at C:\Users\Oscar\Desktop\OCT\node_modules\express-paginate\index.js:65:13 at C:\Users\Oscar\Desktop\OCT\App\Routes\admin-profesores.js:29:46 at tryCatcher (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\util.js:11:23) at Promise._settlePromiseFromHandler (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:488:31) at Promise._settlePromise (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:545:18) at Promise._settlePromise0 (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:590:10) at Promise._settlePromises (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:673:18) at Promise._fulfill (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:614:18) at Promise._resolveCallback (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:415:57) at Promise._settlePromiseFromHandler (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:501:17) at Promise._settlePromise (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:545:18) at Promise._settlePromise0 (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:590:10) at Promise._settlePromises (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:673:18) at Promise._fulfill (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:614:18) at PropertiesPromiseArray.PromiseArray._resolve (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise_array.js:125:19) at PropertiesPromiseArray._promiseFulfilled (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\props.js:78:14) at Promise._settlePromise (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:550:26) at Promise._settlePromise0 (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:590:10) at Promise._settlePromises (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\promise.js:673:18) at Async._drainQueue (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\async.js:125:16) at Async._drainQueues (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\async.js:135:10) at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\Oscar\Desktop\OCT\node_modules\mongoose-paginate\node_modules\bluebird\js\release\async.js:16:14) at processImmediate [as _immediateCallback] (timers.js:383:17)
Here my code that returns the error
`router.route("/")
.get(function (sol, res, next) {
locals={
tipoDeUsuairo: "Profesor",
title: "Profesores",
page_title: "Panel de Profesores"};
The text was updated successfully, but these errors were encountered: