firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
265 stars 124 forks source link

Cannot find module 'jest-environment-jest-environment-jsdom' #245

Closed tufailrahman1 closed 2 years ago

tufailrahman1 commented 2 years ago

I am currently getting error below whenever I try to use the plugin to debug a test.

Exception has occurred: Error: Cannot find module 'jest-environment-jest-environment-jsdom' from '/Users/user/projects/project'
  at resolveSync ([/Users/user/projects/project/node_modules/resolve/lib/sync.js:102:15]())
    at defaultResolver ([/Users/user/projects/project/node_modules/jest-resolve/build/defaultResolver.js:106:38]())
    at Function.findNodeModule ([/Users/user/projects/project/node_modules/jest-resolve/build/index.js:186:14]())
    at resolveWithPrefix ([/Users/user/projects/project/node_modules/jest-config/build/utils.js:201:39]())
    at getTestEnvironment ([/Users/user/projects/project/node_modules/jest-config/build/utils.js:247:3]())
    at normalize ([/Users/user/projects/project/node_modules/jest-config/build/normalize.js:668:59]())
    at readConfig ([/Users/user/projects/project/node_modules/jest-config/build/index.js:224:68]())
    at async readConfigs ([/Users/user/projects/project/node_modules/jest-config/build/index.js:406:26]())
    at async runCLI ([/Users/user/projects/project/node_modules/]()@jest[/core/build/cli/index.js:230:59]())
    at async Object.run ([/Users/user/projects/project/node_modules/jest/node_modules/jest-cli/build/cli/index.js:163:37]())
alansaldivar87 commented 1 year ago

I am facing the same issue, what was the solution?