nestjs / cqrs - TypeError:无法读取安装时未定义的属性“值”

问题描述 投票:1回答:1

尝试使用@nestjs/crqrs包,但是在启动npm install时出现以下错误:

(node:77) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'values' of undefined
api_1_305186ebcc50 |     at modules.map.module (/var/www/node_modules/@nestjs/cqrs/dist/services/explorer.service.js:29:49)
(node:77) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

我不明白为什么,任何想法?

这是我的依赖项:

"dependencies": {
    "@nestjs/common": "^5.4.0",
    "@nestjs/core": "^5.4.0",
    "@nestjs/cqrs": "^6.0.0",
    "@nestjs/swagger": "^2.5.1",
    "bcrypt": "^3.0.5",
    "class-validator": "^0.9.1",
    "compression": "^1.7.4",
    "helmet": "^3.16.0",
    "pg": "^7.8.1",
    "reflect-metadata": "^0.1.12",
    "rxjs": "^6.2.2",
    "shortid": "^2.2.14",
    "typeorm": "^0.2.14",
    "typescript": "^3.0.1"
  },
  "devDependencies": {
    "@nestjs/testing": "^5.1.0",
    "@types/express": "^4.16.0",
    "@types/jest": "^23.3.1",
    "@types/node": "^10.7.1",
    "@types/supertest": "^2.0.5",
    "jest": "^24.5.0",
    "nodemon": "^1.18.3",
    "prettier": "^1.14.2",
    "supertest": "^3.1.0",
    "ts-jest": "^23.1.3",
    "ts-loader": "^4.4.2",
    "ts-node": "^7.0.1",
    "tsconfig-paths": "^3.5.0",
    "tslint": "5.11.0"
  },
javascript node.js typescript nestjs
1个回答
0
投票

您正在为嵌套依赖项使用不同的主要版本(5和6)。由于存在重大变化,因此无法保证其互操作性。

根据@nestjsmigration guide依赖关系更新为v6,或者降级@nestjs/cqrs包。

© www.soinside.com 2019 - 2024. All rights reserved.