在Bluemix上部署时,不会传递Mongoose中间件参数

我正在研究与mongodb连接的mongodb节点应用程序。 我正在使用mongoose中间件修改数据之前保存像:

myschema.pre('save',function(next) { ....... // modfy data here next(); }) 

一切顺利,保存电话总是成功。 但是,我现在正在Bluemix上部署该应用程序,并在保存调用时出现以下错误:

 Error : Your pre must have a next argument -- eg, function (next, ...) 

我不知道为什么这个错误是在我已经使用了next参数的时候产生的,而且在其他地方也是如此。