Open RigottiG opened 1 year ago
Hmm, this sounded like a typical shell env issue. Usually fixed by restarting with a login shell... Do you happen to have jest.shell
configured? If you are using zsh
, try to set it to zsh
to see if that makes any difference. Does this happen every time you start vscode? Or only when vscode got updated, i.e. one time thing?
Hmm, this sounded like a typical shell env issue. Usually fixed by restarting with a login shell... Do you happen to have
jest.shell
configured? If you are usingzsh
, try to set it tozsh
to see if that makes any difference. Does this happen every time you start vscode? Or only when vscode got updated, i.e. one time thing?
I have these configuration.
"jest.shell": "zsh",
"jest.autoRun": "off",
but always I open my vscode I got this issue.
Where do you set the PATH?
zsh has different setup files between login and interactive shells... if the env is set in the interactive shell mode (zshrc) then even using login shell will not source it. While you can try to make the shell login and interactive (by passing -l -i
), but I think the right solution might be either to move the critical env setup to the zshenv
file or otherwise manually source the zshrc before jest (either in your test script or jestCommandLine setting)
Environment
vscode-jest version
: 6.0.1node -v
: 18.12.1npm -v
oryarn --version
: 8.19.2npm ls jest
: jest@29.6.3Prerequisite
npm run test
ornode_modules/.bin/jest
)npm run test
Steps to Reproduce
Just create a minimal project and add Jest and the vscode-jest extension and I got an error.
If I run
code .
inside a terminal, the extension works fine.Expected Behavior
Run vscode extension
Actual Behavior