Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install redis problems

Having problems running npm install redis. Got error:

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

When I tried to install hiredis it would appear to install just fine however, when I tried to run any of the examples they would fail with the required file "redis" not found.

I did finally solve this by installing redis global or:

npm install -g redis

Has anyone else seen this?

like image 234
PhilMDev Avatar asked Dec 14 '22 22:12

PhilMDev


1 Answers

Ensure your app package.json name is not redis.


Good package.json

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

Bad package.json

{
  "name": "redis"
  //...
}
like image 126
Ryan Schumacher Avatar answered Jan 06 '23 04:01

Ryan Schumacher