node.js - mongoosastic fire "TypeError: doc.execPopulate(...).then is not a function" -


i've updated packages npm update. after made test of project, error:

typeerror: doc.execpopulate(...).then not function     @ model.postsave (/myhome/mynodejsserver/node_modules/mongoosastic/lib/mongoosastic.js:620:28) 

was fired.

the error in mymodel.save(); triggered.

what can now?

update:

my real code:

 global.dbmodel.store.findone({email: data.email}, function (err, store) {             if (err)                 return cb({err: {status: 500, error: err}});             if (!store) {                 delete data.isconfirm;                 delete data.isblocked;                 if (data.geo_with_lat_lon && data.geo_with_lat_lon.lat && data.geo_with_lat_lon.lon) {                     var lat = parsefloat(data.geo_with_lat_lon.lat);                     var lon = parsefloat(data.geo_with_lat_lon.lon);                     data.geo_with_lat_lon = {lon: lon, lat: lat};                 }                 var store = new global.dbmodel.store(data);                 store.save(cb); //here fire error             } else {                 return cb({status: 409, error: new error("user exist!")});             }         }); 

can try

return  store.save(cb); 

or

 store.save(cb);  next(); 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -