vscode-jest-runner: yarn 2 pnp fails in fish shell
Using yarn 2.4.0 without node_modules, this plugin fails to start a debugger.
logs from vscode:
Welcome to fish, the friendly interactive shell
Type `help` for instructions on how to use fish
p/era-ci {stav/move-to-yarn2} $ /usr/bin/env 'NODE_OPTIONS=--require "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/bootloader.bundle.js" --inspect-publish-ui=http' 'VSCODE_INSPECTOR_OPTIONS={"inspectorIpc":"/var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/node-cdp.12103-1.sock","deferredMode":false,"waitForDebugger":"","execPath":"/var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/fnm-shell-9979566/bin/node","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"/var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/node-debug-callback-e4d99c0653f081cb"}' /var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/fnm-shell-9979566/bin/node ./node_modules/.bin/jest /Users/stavalfi/projects/era-ci/packages/tests/era-ci-tests/__tests__/print-exiting-flow-logs.spec.ts -c /Users/stavalfi/projects/era-ci/packages/tests/era-ci-tests/jest.config.js -t "@era-ci/core --print-flow <flow-id> fail when we try to print logs of flow-id that does not exists" --runInBand
Debugger attached.
Waiting for the debugger to disconnect...
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module '/Users/stavalfi/projects/era-ci/node_modules/.bin/jest'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
p/era-ci {stav/move-to-yarn2} $ npx envinfo 1s
npx: installed 1 in 1.533s
System:
OS: macOS 10.15.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 1.40 GB / 16.00 GB
Shell: 3.1.2 - /usr/local/bin/fish
Binaries:
Node: 14.16.0 - /var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/fnm-shell-7875095/bin/node
Yarn: 2.4.0 - /var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/fnm-shell-7875095/bin/yarn
npm: 6.14.11 - /var/folders/fh/lk3kyv9n29v3w36bqyv_y7d00000gn/T/fnm-shell-7875095/bin/npm
Managers:
Homebrew: 3.0.1 - /usr/local/bin/brew
pip3: 21.0.1 - /usr/local/bin/pip3
RubyGems: 3.0.3 - /usr/bin/gem
Utilities:
Make: 3.81 - /usr/bin/make
GCC: 4.2.1 - /usr/bin/gcc
Git: 2.28.0 - /usr/local/bin/git
Clang: 1103.0.32.62 - /usr/bin/clang
Servers:
Apache: 2.4.41 - /usr/sbin/apachectl
Virtualization:
Docker: 20.10.2 - /usr/local/bin/docker
IDEs:
Nano: 2.0.6 - /usr/bin/nano
VSCode: 1.53.2 - /usr/local/bin/code
Vim: 8.1 - /usr/bin/vim
Xcode: /undefined - /usr/bin/xcodebuild
Languages:
Bash: 3.2.57 - /bin/bash
Go: 1.15.7 - /usr/local/bin/go
Perl: 5.18.4 - /usr/bin/perl
PHP: 7.3.9 - /usr/bin/php
Python: 2.7.16 - /usr/bin/python
Python3: 3.9.1 - /usr/local/bin/python3
Ruby: 2.6.3 - /usr/bin/ruby
Databases:
SQLite: 3.28.0 - /usr/bin/sqlite3
Browsers:
Brave Browser: 88.1.20.108
Chrome: 88.0.4324.192
Safari: 13.0.3
Monorepos:
Yarn Workspaces: 2.4.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 17 (10 by maintainers)
@stavalfi @firsttris https://github.com/firsttris/vscode-jest-runner/pull/158
i think the way we concat the command together is not compatibel for fish.
do you know whats the problem with the command for fish shell? i don’t see any path problems on my side.
a wait on this computer i have not installed fish… will test tomorrow on my main computer
works like a charm 😉
also using fish btw 👍
we are changing directory to workspace root.
means
vscode.workspace.getConfiguration().get(‘jestrunner.projectPath’) || vscode.workspace.getWorkspaceFolder(editor.document.uri).uri.fsPath;
why does it do that?
https://github.com/firsttris/vscode-jest-runner/blob/master/src/jestRunner.ts#L49