Skip to content

Error: Cannot find module '@jest/test-sequencer' #8268

@elliottsj

Description

@elliottsj

🐛 Bug Report

Getting this fatal error when running Jest with pnpm:

Error: Cannot find module '@jest/test-sequencer'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at /Users/spencerelliott/Dev/path/to/node_modules/.registry.npmjs.org/@jest/core/24.7.0/node_modules/@jest/core/build/runJest.js:290:9
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/spencerelliott/Dev/path/to/node_modules/.registry.npmjs.org/@jest/core/24.7.0/node_modules/@jest/core/build/runJest.js:148:24)
    at _next (/Users/spencerelliott/Dev/path/to/node_modules/.registry.npmjs.org/@jest/core/24.7.0/node_modules/@jest/core/build/runJest.js:168:9)
    at /Users/spencerelliott/Dev/path/to/node_modules/.registry.npmjs.org/@jest/core/24.7.0/node_modules/@jest/core/build/runJest.js:173:7
    at new Promise (<anonymous>)

To Reproduce

Steps to reproduce the behavior:

npm install --global [email protected]
pnpm install jest
./node_modules/.bin/jest

Expected behavior

No fatal error.

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: macOS 10.14.3
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  Binaries:
    Node: 10.15.0 - /var/folders/ms/t3l222rn1v3dkvvnytj4vfkw0000gn/T/fnm-shell-1068309/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.8.0 - /var/folders/ms/t3l222rn1v3dkvvnytj4vfkw0000gn/T/fnm-shell-1068309/bin/npm
  npmPackages:
    jest: ^24.7.0 => 24.7.0

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