stipsan / ioredis-mock

Emulates ioredis by performing all operations in-memory.
MIT License
333 stars 125 forks source link

Cannot find module 'ioredis/build/Command` #1340

Closed pmwisdom closed 7 months ago

pmwisdom commented 7 months ago

Running this in a test emits the error Cannot find module 'ioredis/built/Command' from X/ioredis-mock/lib/index.js

The file that its looking for is lowercase, but the import is proper so it fails. Changing the index.js file to be lower case works after it is installed but obviously a fresh install will overwrite this.

https://github.com/stipsan/ioredis-mock/blob/6a5895505def87261315053f4fecab42bcc44883/src/command.js#L2

image

pmwisdom commented 7 months ago

Ah I was using a 4.X version, 5.X works as expected