我收到以下错误:
(node:5245)UnhandledPromiseRejectionWarning:未处理的承诺 rejection(rejection id:1):TypeError:不能使用'in'运算符 在TweeterSearch中搜索'promiseLibrary'
(节点:5245)[DEP0018]弃用警告:未处理的拒绝承诺 不推荐使用。在未来,承诺拒绝未处理 将使用非零退出代码
终止Node.js进程
这是我的config.js文件
// general configuration
var mongoose = require('mongoose');
var config = {
db_host: 'mongodb://localhost',
db_name: 'TweeterSearch',
db_collection_twitter: 'Tweets',
db_debug: 0,
// Twitter Harvester Schema API 1.1
tw_harvest_schema_11: {
contributors : mongoose.Schema.Types.Mixed,
coordinates: mongoose.Schema.Types.Mixed,
created_at: Date,
current_user_retweet : mongoose.Schema.Types.Mixed,
entities: mongoose.Schema.Types.Mixed,
favorited : Boolean,
geo : mongoose.Schema.Types.Mixed,
id: Number,
id_str : String,
in_reply_to_screen_name : String,
in_reply_to_status_id : Number,
in_reply_to_status_id_str: String,
in_reply_to_user_id : Number,
in_reply_to_user_id_str : String,
place : mongoose.Schema.Types.Mixed,
possibly_sensitive : Boolean,
scopes : mongoose.Schema.Types.Mixed,
retweet_count : Number,
retweeted_status: mongoose.Schema.Types.Mixed,
retweeted : Boolean,
source: String,
text : String,
truncated : Boolean,
user : mongoose.Schema.Types.Mixed,
withheld_copyright : Boolean,
withheld_in_countries : mongoose.Schema.Types.Mixed,
withheld_scope : String,
},
}
module.exports = config;
为了让我的app.js有效,我应该做些什么改变?