redis / ioredis

🚀 A robust, performance-focused, and full-featured Redis client for Node.js.
MIT License
14.07k stars 1.19k forks source link

TypeError: Cannot redefine property: default #1822

Open tobiasdiez opened 9 months ago

tobiasdiez commented 9 months ago

Sometimes (sadly not very reproducible) I get the following error:


TypeError: Cannot redefine property: default

node_modules/ioredis/built/index.js:6:8
      4| exports = module.exports = require("./Redis").default;
      5| var Redis_1 = require("./Redis");
      6| Object.defineProperty(exports, "default", { enumerable: true, get: fun…
       |        ^
``̀ 
This mostly happens when testing with vitest and only seems to occur if ioredis is imported in multiple locations