joeferner / redis-commander

Redis management tool written in node.js
http://joeferner.github.io/redis-commander/
MIT License
3.56k stars 460 forks source link

TypeError: connectionWrapper.replaceConnection is not a function in the latest docker image #526

Closed SqrtMinusOne closed 1 year ago

SqrtMinusOne commented 1 year ago

The following docker-compose.yml:

docker-compose.yml ```yaml version: "3.5" services: redis: image: 'bitnami/redis:latest' hostname: redis restart: unless-stopped ports: - "6379:6379" environment: - REDIS_PASSWORD=12345 redis_commander: image: 'ghcr.io/joeferner/redis-commander:latest' hostname: redis-commander restart: unless-stopped environment: - PORT=8010 - REDIS_HOST=redis - REDIS_HOSTS=local:redis:6379 - REDIS_PASSWORD=12345 ports: - "8010:8010" ```

Fails as follows:

docker log ``` Using scan instead of keys /redis-commander/bin/redis-commander.js:664 connectionWrapper.replaceConnection(config.connections, oldDefault, newDefault); ^ TypeError: connectionWrapper.replaceConnection is not a function at startAllConnections (/redis-commander/bin/redis-commander.js:664:27) at Object. (/redis-commander/bin/redis-commander.js:389:5) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 Node.js v18.16.0 ```

Version 0.8.1 (i.e. replace latest with 0.8.1 in the compose file) works fine.

sseide commented 1 year ago

Thanks, there was a function export missing. Can you please retest with latest?

SqrtMinusOne commented 1 year ago

Yes, seems to work fine now. Thanks!