I have 2 nest libraries and a project that uses these libraries. I want to update the version, but I am encountering an error. My steps and package.json content are as follows:
@/stretched-kafka-produucer-module
Module’s package.json:
"dependencies": {
"log-annotation": "^0.0.14",
"kafkajs": "^2.2.4",
"object-path": "^0.11.4",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"@nestjs/common": "^10.3.0",
"@nestjs/core": "^10.3.0"
},
"devDependencies": {
"@nestjs/common": "^10.3.0",
"@nestjs/core": "^10.3.0",
"@nestjs/cli": "^8.2.4",
"@nestjs/platform-express": "^6.10.1",
"@nestjs/schematics": "^7.0.0",
"@nestjs/testing": "^6.8.0",
"@types/jest": "^24.0.18",
"@types/node": "^12.7.8",
"@types/object-path": "^0.11.0",
"husky": "^3.0.9",
"jest": "^25.1.0",
"jest-junit": "^13.0.0",
"prettier": "^1.18.2",
"rimraf": "^3.0.0",
"supertest": "^4.0.2",
"ts-jest": "^25.1.0",
"ts-loader": "^6.2.0",
"ts-mockito": "^2.5.0",
"ts-node": "^8.4.1",
"tsconfig-paths": "^3.9.0",
"typescript": "^4.6.2"
}
Note: The log-annotation is also my library.
@/action-log-producer
Module’s package.json:
"dependencies": {
"@log-annotation": "^0.0.6",
"@stretched-kafka-producer-module": "2.7.4",
"@nestjs/platform-express": "^8.0.0",
"luxon": "^3.0.1",
"rimraf": "^3.0.2",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"@nestjs/common": "^10.3.0",
"@nestjs/core": "^10.3.0"
},
"devDependencies": {
"@nestjs/cli": "^8.0.0",
"@nestjs/schematics": "^8.0.0",
"@nestjs/testing": "^8.0.0",
"@types/express": "^4.17.13",
"@types/jest": "27.4.1",
"@types/node": "^16.0.0",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.2.5",
"prettier": "^2.3.2",
"source-map-support": "^0.5.20",
"supertest": "^6.1.3",
"ts-jest": "^27.0.3",
"ts-loader": "^9.2.3",
"ts-node": "^10.0.0",
"tsconfig-paths": "^3.10.1",
"typescript": "^4.3.5"
}
**For the BFF project, package.json:
"dependencies": {
"@action-log-producer": "3.0.7",
"@axios-retry": "^1.0.7",
"@dynamic-config": "^1.0.4",
"@kibana-logger": "^1.0.5",
"@log-annotation": "^0.0.14",
"@faker-js/faker": "^8.4.1",
"@nestjs/common": "^10.3.0",
"@nestjs/core": "^10.3.0",
"@nestjs/jwt": "^10.2.0",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/swagger": "^7.3.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"dnscache": "^1.0.2",
"fp-ts": "^2.16.5",
"helmet": "^7.1.0",
"io-ts": "^2.2.21",
"isomorphic-fetch": "^3.0.0",
"newrelic": "^11.15.0",
"passport": "^0.7.0",
"passport-jwt": "^4.0.1",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
"sinon": "^17.0.1",
"ty-utility": "^1.0.6",
"typescript-optional": "^3.0.0-alpha.3"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/nock": "^11.1.0",
"@types/node": "^20.3.1",
"@types/sinon": "^17.0.2",
"@types/supertest": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.42.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.0.0",
"gts": "^5.2.0",
"jest": "^29.5.0",
"jest-junit": "^16.0.0",
"nock": "^13.2.1",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-mockito": "^2.6.1",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
}
However, when I try to start my BFF project, I get the following error:
Nest can't resolve dependencies of the StretchedKafkaProducerAdapter (?, GLOBAL_LOGGER). Please make sure that the argument dependency at index [0] is available in the ActionLogProducerModule context.
Potential solutions:
- Is ActionLogProducerModule a valid NestJS module?
- If dependency is a provider, is it part of the current ActionLogProducerModule?
- If dependency is exported from a separate , is that module imported within ActionLogProducerModule?
({
imports: [ /* the Module containing dependency */ ]
})
Also producer-module module was working fine in the old version. I took nest/common and nest/core to peer dependency as follows, but there was no solution:
"peerDependencies": {
"@nestjs/common": "^10.3.0",
"@nestjs/core": "^10.3.0"
},
I cannot start the project, can you help me?
I could not get the application to stand up with the solutions I tried
Kader Genç is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.