Skip to content

node init.js UnhandledPromiseRejectionWarning: Error: The client is closed #695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
roger-OR-CAT opened this issue Dec 2, 2021 · 1 comment

Comments

@roger-OR-CAT
Copy link

This is my ifirst installation, but stuck on this issue.

Environment:

ubuntu 20.04
node -v: 11.15.0
npm: 6.7.0
redis-server: Redis version=6.0.6, bits=64 (installed from ppa:chris-lea/redis-server, as indicated on the requirements).

Cloning the pool and running npm update completed with warning and no errors. Ubuntu 20.04 comes with python3 by default, I installed python 2 before proceeding with npm update. Process completed with no problems.

node init.js fails at the beginning

(node:62186) UnhandledPromiseRejectionWarning: Error: The client is closed
at Commander._RedisClient_sendCommand (/home/roger/pool/node_modules/@node-redis/client/dist/lib/client/index.js:387:31)
at Commander.commandsExecutor (/home/roger/pool/node_modules/@node-redis/client/dist/lib/client/index.js:160:154)
at Commander.BaseClass.(anonymous function) [as info] (/home/roger/pool/node_modules/@node-redis/client/dist/lib/commander.js:8:29)
at checkRedisVersion (/home/roger/pool/init.js:147:15)
at init (/home/roger/pool/init.js:102:3)
at Object. (/home/roger/pool/init.js:141:4)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
(node:62186) 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: 2)
(node:62186) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:62186) UnhandledPromiseRejectionWarning: Error: The client is closed

Redis is available and running on the standard port:

~/pool$ redis-cli
127.0.0.1:6379> PING
PONG

Any clue?

R.

@roger-OR-CAT
Copy link
Author

Solved: the Redis dependency on package.json must be 3.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant