In my case, I developed a library last time that use ioredis
as peer dependency. My solution was to put that library as well in dev dependency.
// package.json
"peerDependencies": {
"ioredis": "4.x"
},
"devDependencies": {
"ioredis": "4.x"
}
it worked well and no issue so far using this approach.