Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension appears to be missing npm-which? #172

Open
Makeshift opened this issue Sep 14, 2022 · 1 comment
Open

Extension appears to be missing npm-which? #172

Makeshift opened this issue Sep 14, 2022 · 1 comment

Comments

@Makeshift
Copy link

Makeshift commented Sep 14, 2022

In addition to the details for issue, please provide us Executables information and Debug output unless you have confidence that they don't help us.

Executables

Version of bash-debug: v0.3.9

Output of following commands (Note I am using WSL - also where isn't a command, not sure what that was meant to be):

$ code --version
1.71.0
784b0177c56c607789f9638da7b6bf3230d47a8c
x64

$ bash -c 'uname -a; for P in bash bashdb cat mkfifo pkill; do echo ---; which -a $P; command $P --version; done'
---
/usr/bin/bash
/bin/bash
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
---
bash: bashdb: command not found
---
/usr/bin/cat
/bin/cat
cat (GNU coreutils) 8.30
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund and Richard M. Stallman.
---
/usr/bin/mkfifo
/bin/mkfifo
mkfifo (GNU coreutils) 8.30
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.
---
/usr/bin/pkill
/bin/pkill
pkill from procps-ng 3.3.16

Tried installing bashdb from source also, just for giggles, afterwards:

$ which -a bashdb; command bashdb --version
/usr/bin/bashdb
/bin/bashdb
bashdb, release 5.0-1.1.2

Debug output

It doesn't get far enough for debug output, but here's the log from Log (Remote Extension Host)

[2022-09-14 18:37:22.659] [exthost] [error] Activating extension rogalmic.bash-debug failed due to an error:
[2022-09-14 18:37:22.659] [exthost] [error] Error: Cannot find module 'npm-which'
Require stack:
- /home/connor/.vscode-server/extensions/rogalmic.bash-debug-0.3.9/out/extension.js
- /home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/loader.js
- /home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/bootstrap-amd.js
- /home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/bootstrap-fork.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.s._load (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:111:14538)
    at Function.p._load (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:106:62866)
    at Function.E._load (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:106:62234)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/connor/.vscode-server/extensions/rogalmic.bash-debug-0.3.9/out/extension.js:7:15)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.s._load (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:111:14538)
    at Function.p._load (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:106:62866)
    at Function.E._load (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:106:62234)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Function.r [as __$__nodeRequire] (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/loader.js:5:101)
    at b._loadCommonJSModule (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:106:64346)
    at b._doActivateExtension (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:97:14941)
    at b._activateExtension (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:97:13880)
    at Object.actualActivateExtension (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:97:9877)
    at E._activate (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:8241)
    at E._waitForDepsThenActivate (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:8177)
    at E._initialize (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:7541)
    at new E (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:7340)
    at P._createAndSaveOperation (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:6965)
    at P._handleActivationRequest (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:6876)
    at /home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:5308
    at Array.map (<anonymous>)
    at P._activateExtensions (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:5296)
    at P.activateByEvent (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:4889)
    at b._activateByEvent (/home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:97:11861)
    at /home/connor/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:97:23637
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Details

Tried:

  • a fresh install of the extension
  • trying in a smaller workspace
  • disabling other bash-related extensions,
  • running npm install -g npm-which
  • Noticed bashdb wasn't installed on path (extension is meant to come with it so I didn't bother), installed bashdb from source
  • Removing nvm from my .bashrc just in case it was messing with vscode's node_modules (and rebooting WSL to make sure everything picked it up)
  • manually installing npm-which into a directory and then moving it into the extension hosts node_modules with cp -r * ~/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/node_modules/

Unsurprisingly, none of this worked. I can see it's a dependency in package.json, so I'm curious why vscode'd node appears to be unable to find it...

@Makeshift
Copy link
Author

Found a workaround! Downloading the extension from the marketplace as a vsix and then installing directly into vscode appears to bundle the dependencies correctly. Instructions here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant