question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running "Jest: Setup Extension" doesn't work

See original GitHub issue

I’m getting this message:

Jest: Setup Extension (Beta)’ resulted in an error (command ‘io.orta.jest.setup-extension’ not found)

image

Environment

  1. vscode-jest version: v4.2.1
  2. node -v: v14.15.5
  3. npm -v or yarn --version: yarn 2.4.1
  4. npm ls jest or npm ls react-scripts (if you haven’t ejected): I’m using yarn PnP
  5. your vscode-jest settings if customized:
    • jest.jestCommandLine? N/A
    • jest.autoRun? N/A
    • anything else that you think might be relevant? N/A
  6. Operating system: MacOS 12.1

Prerequisite

  • are you able to run jest test from the command line? yes
  • how do you run your tests from the command line? (for example: npm run test or node_modules/.bin/jest) yarn run jest ... when inside a specific package or yarn workspace <package> run ... when in repo root

Steps to Reproduce

I’m in a yarn2 PnP monorepo with multiple packages.

Relevant Debug Info

Expected Behavior

The setup wizard is run

Actual Behavior

An error dialog appears

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

1reaction
connectdotzcommented, Jan 28, 2022

@the21st thanks for the repo. I was able to reproduce the error, however as I mentioned earlier, the way this extension supports monorepo is via vscode multiroom workspaces, which is pretty easy to do. Once converted, the sample repo worked perfectly.

I have created a PR(the21st/yarn-2-workspaces-monorepo-example#1) against your sample for such conversion (just one file actually). Let me know if you still have any problems…

0reactions
connectdotzcommented, Dec 2, 2022

This should be addressed by the following v5 features:

  1. deep activation, you should not see the extension not found error
  2. monorepo setup tool can then easily auto config the project to be multi-root.

Close this issue but feel free to reopen it if you have other issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vscode jest extension doesn't work properly - Stack Overflow
I had been running tests using WSL2 with no issues (without the extension), but encountered "jest command not found" with the extension. After...
Read more >
Troubleshooting - Jest
Troubleshooting. Uh oh, something went wrong? Use this guide to resolve issues with Jest. Tests are Failing and You Don't Know Why​.
Read more >
vscode-jest - Visual Studio Marketplace
Extension for Visual Studio Code - Use Facebook's Jest With Pleasure. ... Simply open Jest - Visual Studio Marketplace and click "Install".
Read more >
2.2.1.10 - VSCode Jest Extension - LearnHowToProgram.com
As long as you can write tests, run them with Jest in the terminal using $ npm test , and debug manually using...
Read more >
VS-Code & Jest Integration - A Developer - Medium
One can very easily get the Jest Run It in VS code via the extensions, go to the extensions explorer, find and install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found