Skip to content

TypeError: Cannot redefine property: default #1822

Open
@tobiasdiez

Description

@tobiasdiez

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions