Closed na3r closed 2 years ago
I just installed the latest version and imported redis module into my app.module and get this error
node_modules/@liaoliaots/nestjs-redis/dist/redis/common/redis.utils.d.ts:7:110 - error TS2304: Cannot find name 'PromiseSettledResult'. 7 export declare const quitClients: (clients: RedisClients) => Promise<[PromiseSettledResult<ClientNamespace>, PromiseSettledResult<"OK">][]>;
No response
RedisModule.forRoot({ config: { host: 'redis', port: 6379, }, }),
run without any error!
here is nestjs info
yarn run v1.22.17 $ /home/node/app/node_modules/.bin/nest info _ _ _ ___ _____ _____ _ _____ | \ | | | | |_ |/ ___|/ __ \| | |_ _| | \| | ___ ___ | |_ | |\ `--. | / \/| | | | | . ` | / _ \/ __|| __| | | `--. \| | | | | | | |\ || __/\__ \| |_ /\__/ //\__/ /| \__/\| |_____| |_ \_| \_/ \___||___/ \__|\____/ \____/ \____/\_____/\___/ [System Information] OS Version : Linux 5.15 NodeJS Version : v16.14.0 YARN Version : 1.22.17 [Nest CLI] Nest CLI Version : 8.2.4 [Nest Platform Information] platform-express version : 8.4.3 platform-fastify version : 8.4.3 microservices version : 8.4.3 schematics version : 8.0.9 throttler version : 2.0.1 passport version : 8.2.1 graphql version : 9.2.7 swagger version : 5.2.1 typeorm version : 8.0.3 testing version : 8.4.3 apollo version : 10.0.8 common version : 8.4.3 config version : 1.2.1 axios version : 0.0.7 core version : 8.4.3 cqrs version : 8.0.3 jwt version : 8.0.0 cli version : 8.2.4 Done in 2.18s.
8.4.3
"dependencies": { "@casl/ability": "^5.4.3", "@graphql-tools/utils": "^7", "@liaoliaots/nestjs-redis": "^8.1.0", "@nestjs/apollo": "^10.0.8", "@nestjs/axios": "^0.0.7", "@nestjs/common": "^8.0.4", "@nestjs/config": "^1.0.1", "@nestjs/core": "^8.0.4", "@nestjs/cqrs": "^8.0.0", "@nestjs/graphql": "^9.0.6", "@nestjs/jwt": "^8.0.0", "@nestjs/microservices": "^8.2.3", "@nestjs/passport": "^8.0.0", "@nestjs/platform-express": "^8.0.4", "@nestjs/platform-fastify": "^8.0.4", "@nestjs/swagger": "^5.0.9", "@nestjs/throttler": "^2.0.0", "@nestjs/typeorm": "^8.0.1", "@types/bcrypt": "^3.0.0", "@types/lodash": "^4.14.178", "@types/passport": "^1.0.4", "@types/validator": "^13.1.1", "amqp-connection-manager": "^3.7.0", "amqplib": "^0.8.0", "apollo-server-fastify": "^3.4.0", "axios": "^0.26.1", "bcrypt": "^5.0.0", "class-transformer": "^0.3.1", "class-validator": "^0.12.2", "csvtojson": "^2.0.10", "fastify-helmet": "^5.3.2", "fastify-swagger": "^4.8.3", "graphql": "^15.6.1", "graphql-type-json": "^0.3.2", "ioredis": "^5.0.4", "jalali-moment": "^3.3.10", "jsonata": "^1.8.5", "kavenegar": "^1.1.4", "knex": "^0.21.12", "lodash": "^4.17.21", "moment": "^2.29.1", "nest-commander": "^2.3.5", "nestjs-typeorm-paginate": "^3.1.3", "order-id": "^2.1.2", "otplib": "^12.0.1", "passport": "^0.4.1", "passport-custom": "^1.1.1", "passport-jwt": "^4.0.0", "passport-local": "^1.0.0", "pg": "^8.5.1", "reflect-metadata": "^0.1.13", "rimraf": "^3.0.2", "rxjs": "^7.0.0", "typeorm": "^0.2.29", "typeorm-polymorphic": "^0.0.3", "typeorm-seeding": "^1.6.1" }, "devDependencies": { "@apollo/gateway": "^0.45.0", "@nestjs/cli": "^8.2.4", "@nestjs/schematics": "^8.0.8", "@nestjs/testing": "^8.4.3", "@types/express": "^4.17.8", "@types/faker": "^5.5.9", "@types/jest": "^26.0.15", "@types/node": "^14.14.6", "@types/passport-jwt": "^3.0.3", "@types/passport-local": "^1.0.33", "@types/supertest": "^2.0.10", "@typescript-eslint/eslint-plugin": "^4.6.1", "@typescript-eslint/parser": "^4.6.1", "eslint": "^7.12.1", "eslint-config-prettier": "^6.15.0", "eslint-plugin-prettier": "^3.1.4", "jest": "^26.6.3", "prettier": "^2.1.2", "supertest": "^6.0.0", "ts-jest": "^26.4.3", "ts-loader": "^8.0.8", "ts-morph": "^12.0.0", "ts-node": "^9.0.0", "tsconfig-paths": "^3.9.0", "typescript": "^4.0.5" },
I solved issue by changing target in tsconfig from es2017 to es202
{ "compilerOptions": { // ... "target": "es2020" }
Current behavior
I just installed the latest version and imported redis module into my app.module and get this error
Minimum reproduction code
No response
Steps to reproduce
Expected behavior
run without any error!
here is nestjs info
NestJS version
8.4.3
Packages versions
Node.js version
No response
In which operating systems have you tested?
Other
No response