redis-commander icon indicating copy to clipboard operation
redis-commander copied to clipboard

"Path must be a string" error after hitting the browser url

Open c-u-l8er opened this issue 10 years ago • 9 comments

I just installed, went to the url, then the terminal threw this error.

redis-commander -p 8081
No config found or was invalid.
Using default configuration.
No Save: false
listening on  0.0.0.0 : 8081
Redis Connection 127.0.0.1:6379 Using Redis DB #0
path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1326:5)
    at Deps.lookupPackage (/usr/lib/node_modules/redis-commander/node_modules/module-deps/index.js:452:29)
    at Deps._transform (/usr/lib/node_modules/redis-commander/node_modules/module-deps/index.js:93:10)
    at Deps.Transform._read (/usr/lib/node_modules/redis-commander/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Deps.Transform._write (/usr/lib/node_modules/redis-commander/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at Labeled.Pipeline._write (/usr/lib/node_modules/redis-commander/node_modules/stream-splicer/index.js:73:22)
    at doWrite (/usr/lib/node_modules/redis-commander/node_modules/readable-stream/lib/_stream_writable.js:279:12)
    at writeOrBuffer (/usr/lib/node_modules/redis-commander/node_modules/readable-stream/lib/_stream_writable.js:266:5)
    at Labeled.Writable.write (/usr/lib/node_modules/redis-commander/node_modules/readable-stream/lib/_stream_writable.js:211:11)

c-u-l8er avatar Jun 12 '16 19:06 c-u-l8er

I get the same error on my hosts running Arch Linux as they use newer versions of nodejs. On my hosts running CentOS 7.2 there aren't any issues. I haven't tested this very much, just throwing in my observations.

cduchesne avatar Jun 14 '16 23:06 cduchesne

This occurs with nodejs 6.2.2. Seems that changes from v6 API breaks it.

Seems that the issue is that v6 API would assert that path is a string eslint/eslint#5678 nodejs/node@08085c49b6e49ecfffd638c6cd46f4de639ae4f4

itsnotvalid avatar Jun 22 '16 10:06 itsnotvalid

Same here in a docker container. Interestingly, changing Node to 5.12 in the container did not work. Still throws the error. (I tried the below test). Using Docker for Mac. (and yes I did rebuild the container)

# Simple Dockerfile to execute redis-commander from docker
# build it with like: docker build -t redis-commander .
# to run: docker run -d --name redis-commander -p 8081:8081 redis-commander -- --redis-host your-redis-host
FROM node:5.12

RUN mkdir -p /usr/src
WORKDIR /usr/src

RUN git clone https://github.com/joeferner/redis-commander.git \
    && cd redis-commander \
    && npm install -g redis-commander

ENTRYPOINT [ "redis-commander" ]

EXPOSE 8081

dstroot avatar Jul 03 '16 14:07 dstroot

I built with the followng Dockerfile and it did work for me. You may have to run in --net host if you're trying to connect to a redis instance that is localhost only.

docker run -d --name redis-commander --net host redis-commander

  • this works assuming redis is running locally with default options
redis-host
FROM node:5

RUN mkdir -p /usr/src
WORKDIR /usr/src

RUN git clone https://github.com/joeferner/redis-commander.git \
        && cd redis-commander \
        && npm install -g redis-commander

ENTRYPOINT [ "redis-commander" ]

EXPOSE 8081

cduchesne avatar Jul 04 '16 07:07 cduchesne

v0.4.1 works for me now

scottarver avatar Jul 15 '16 17:07 scottarver

With the latest code including the fix for Node.js v6, I have the same error message. Tried with nvm several node versions

  • Node version 6.8.0
  • Node version 6.0.0

Finally It works with v4.6.1 but still not with the latest Node.js version.

By the way and not related to this issue: The option "redis_label" ist not listed in the help list. This could be improved.

simsationX avatar Oct 19 '16 11:10 simsationX

I have the same issue with node 6.9.1. It works with node 4.2.3.

tylercollier avatar Dec 14 '16 17:12 tylercollier

have the same issue with node v6.9.2

beeant avatar Dec 16 '16 00:12 beeant

This problem should be fixed in current version. If you think its not feel free to reopen issue with updated informations based on latest version.

sseide avatar Feb 08 '19 15:02 sseide