0

在我运行“npm update”以使用最新库推送我的代码之前,一切运行良好。现在我收到错误:

{ message: 'Method Map.prototype.has call on in compatible receiver #', stack: 'TypeError: Method Map.prototype.has call on incompatible receiver #\n at Clone.has ()\n at 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 在对象。 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 (/Users/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)' }11)\n 在 Object.extractRawSchema (/Users/myproject/framework/nDatabase/bin/system.js:418:40)' }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"
}

请帮我解决这个问题。

4

0 回答 0