gpt4 book ai didi

javascript - Nestjs/cqrs - 类型错误 : Cannot read property 'values' of undefined on install

转载 作者:太空宇宙 更新时间:2023-11-04 01:33:03 24 4
gpt4 key购买 nike

尝试使用 @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"
},

最佳答案

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

根据 migration guide 将您的 @nestjs 依赖项更新为 v6或者,降级 @nestjs/cqrs 软件包。

关于javascript - Nestjs/cqrs - 类型错误 : Cannot read property 'values' of undefined on install,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55440658/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com