You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue occur when all extensions are disabled?: N/A
VS Code Version: 1.94.2
OS Version: Mac OS 1.5.0.1
Steps to Reproduce:
Attempt to install an extension $some_extension from VSIX that depends on another extension $dependency that is not installed via code --install-extension.
Witness the following very unhelpful error message:
Error: Unable to resolve nonexistent file '/Users/jvilk/.vscode/extensions/$dependency'
at Ta.resolve (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/node/cliProcessMain.js:52:84339)
at async Ca.H (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/node/cliProcessMain.js:52:74456)
at async Promise.all (index 21)
at async Ca.scanAllUserExtensions (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/node/cliProcessMain.js:52:69779)
at async ja.w (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/node/cliProcessMain.js:52:79734)
at async ja.h (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/node/cliProcessMain.js:52:77963) {
code: 'Scanning',
name: 'Scanning'
}
A reader might think that this error message is sufficiently clear; if you are installing $some_extension and get this error about $dependency, maybe you need $dependency. Unfortunately, you also get this error if you are installing both $dependency and $some_extension in the wrong order in one CLI invocation. In this context, this error message is very confusing:
I was able to solve this confusing mystery with debug output, which revealed that the error about $dependency occurred while installing $some_extension:
ERR Error while installing the extension $some_extension Unable to resolve nonexistent file '/Users/jvilk/.vscode/extensions/$dependency'
Some possible ways to fix:
Adjust the error message to indicate that the dependency must be installed first.
(Harder) When provided a list of extensions to install, order them to install dependencies first.
This issue came up while working on the system Stripe uses to manage/install custom extensions that are not present in the Marketplace. We have some that depend on one-another now, causing this new wrinkle. Our workaround is to retry n times until success, so long as we have forward progress.
The text was updated successfully, but these errors were encountered:
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.95.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
jvilk-stripe
changed the title
code --install-extension path/to/file.vsix fails with unclear error when dependent extension is not installedcode --install-extension path/to/file.vsix fails with unclear error when dependency extension is not installed
Nov 8, 2024
I've hit another bug with this in remote development as opposed to the native VS Code; doing code-server --install-extension $some_extension.vsix --install-extension $dependency.vsix can cause $some_extension to be extracted into ~/.code-server/extensions/$some_extension-version but not installed, which causes all subsequent installs of $some_extension to fail until I manually remove that folder. If I have time, I'll see if I can repro that other, somewhat related bug with some OSS extensions.
There's a third bug where code --uninstall-extension $dependency --uninstall-extension $some_extension fails because it uninstalls extensions in order, and fails uninstalling $dependency because $some_extension is installed. We work around that by retrying with the first extension in the list pushed to the back until all requested extensions are uninstalled.
I can file these separately if there is interest in fixing, otherwise I'll save my time -- I know the VSIX path isn't the 'golden path' for VS Code. :)
Does this issue occur when all extensions are disabled?: N/A
Steps to Reproduce:
$some_extension
from VSIX that depends on another extension$dependency
that is not installed viacode --install-extension
.A reader might think that this error message is sufficiently clear; if you are installing
$some_extension
and get this error about$dependency
, maybe you need$dependency
. Unfortunately, you also get this error if you are installing both$dependency
and$some_extension
in the wrong order in one CLI invocation. In this context, this error message is very confusing:I was able to solve this confusing mystery with debug output, which revealed that the error about
$dependency
occurred while installing$some_extension
:Some possible ways to fix:
This issue came up while working on the system Stripe uses to manage/install custom extensions that are not present in the Marketplace. We have some that depend on one-another now, causing this new wrinkle. Our workaround is to retry
n
times until success, so long as we have forward progress.The text was updated successfully, but these errors were encountered: