Skip to content

[Bug]: Module cache already has entry - /node_modules/yargs/build/lib/parse-command.js. #13008

@bameyrick

Description

@bameyrick

Version

28.1.2

Steps to reproduce

  1. Clone https://github.com/bameyrick/iso-3166-1-flags-sprite-generator.git
  2. Checkout branch yargs
  3. Run npm i
  4. Run npm run fetch
  5. Run npm run test
  6. Tests will fail with the error:
 Module cache already has entry /iso-3166-1-flags-sprite-generator/node_modules/yargs/build/lib/parse-command.js. This is a bug in Jest, please report it!

      at invariant (node_modules/jest-runtime/build/index.js:2591:11)
          at async Promise.all (index 4)
          at async Promise.all (index 5)

Expected behavior

Jest should be able to run both sets of tests

Actual behavior

Module cache already has entry /iso-3166-1-flags-sprite-generator/node_modules/yargs/build/lib/parse-command.js. This is a bug in Jest, please report it! error thrown

Additional context

No response

Environment

System:
    OS: macOS 12.4
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.15.1/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
  npmPackages:
    jest: ^28.1.2 => 28.1.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions