Npm install problems with redis

Problems starting npm install redis. Received error:

npm WARN install Refusing to install redis as a dependency of itself

When I tried installing hiredis, it seemed to install just fine, however, when I tried to run any of the examples that they failed, the required "redis" file was not found.

I finally solved this by installing redis global or:

npm install -g redis

Has anyone else seen this?

+4
source share
2 answers

Make sure your application name is package.jsonnot redis .


Nice package.json

{
  "name": "redis-app"
  //...
}

Bad .json package

{
  "name": "redis"
  //...
}
+6
source

. , NPM. redis redisApp - .

+2

Source: https://habr.com/ru/post/1540974/


All Articles