在运行“ npm update”将代码推送到最新库之前,一切运行良好。现在我得到了错误:
{消息:“方法Map.prototype。已在不兼容的接收器#上调用”, stack:'TypeError:方法Map.prototype。已在Clone上的不兼容接收器#\ n上调用。has()\ n在get(/Users/myproject/node_modules/kareem/index.js:418:11)\n在Clone .Kareem.pre(/Users/myproject/node_modules/kareem/index.js:350:16)\n在Clone.Schema.pre(/Users/myproject/node_modules/mongoose/lib/schema.js:1135:20) \ n在Schema.extend(/Users/myproject/node_modules/mongoose-schema-extend/index.js:73:15)\n在Object.createSchema(/Users/myproject/framework/nDatabase/bin/system.js: 341:89)\ n在/Users/myproject/framework/nDatabase/bin/system.js:384:24\n在Array.forEach()\ n在Object.resolveSchemaDependancy(/ Users / myproject / framework / nDatabase / bin /system.js:356:25)\n在/Users/myproject/framework/nDatabase/bin/system.js:406:24\n在/Users/myproject/node_modules/lodash/lodash.js:4917:15 \ n在baseForOwn(/Users/myproject/node_modules/lodash/lodash.js:3002:24)\n在/Users/myproject/node_modules/lodash/lodash.js:4886:18\n在Function.forEach(/ U Sers / myproject / node_modules / lodash / lodash.js:9334:14)\ n在Object.traverseSchemas(/Users/myproject/framework/nDatabase/bin/system.js:401:11)\n在Object.extractRawSchema(/ Users / myproject / framework / nDatabase / bin / system.js:418:40)'}
错误表明在使用时loadash库存在一些问题:
_.each({}, (object, name) =>{
/////
});
以下是我使用的依赖项列表:
"dependencies": {
"async": "^2.6.1",
"bcrypt": "^1.0.3",
"body-parser": "^1.18.3",
"chai": "^4.1.2",
"cron": "^1.3.0",
"express": "^4.16.3",
"java": "^0.9.1",
"kafka-node": "^2.6.1",
"lodash": "^4.17.10",
"mocha": "^4.1.0",
"mocha-suit": "^0.5.3",
"mongodb": "^3.1.0-beta4",
"mongoose": "^5.1.6",
"mongoose-schema-extend": "0.2.0",
"node-cache": "^4.2.0",
"recursive-copy": "^2.0.8",
"redis": "^2.8.0",
"request-promise": "^4.2.2",
"should": "^13.2.1",
"stompit": "^0.25.0",
"uuid": "^3.2.1",
"winston": "^2.4.3",
"winston-daily-rotate-file": "^3.2.1",
"winston-elasticsearch": "^0.7.0"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-vue": "^2.0.2",
"babel-runtime": "^6.26.0",
"css-loader": "^0.28.11",
"meow": "^5.0.0",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"style-loader": "^0.21.0",
"webpack": "^4.12.0",
"webpack-dev-middleware": "^3.1.3"
}
请帮助我解决此问题。