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

Error: Failed to list installed modules even if ignored #106

Open
felipecrs opened this issue Dec 30, 2024 · 1 comment
Open

Error: Failed to list installed modules even if ignored #106

felipecrs opened this issue Dec 30, 2024 · 1 comment

Comments

@felipecrs
Copy link

felipecrs commented Dec 30, 2024

Hi,

Firstly, thank you very much for the tool. It has proven very useful to me for many times.

I am trying to override a broken dependency (microsoft/vscode-vsce#1107):

{
  "overrides": {
    "@vscode/vsce-sign": "./see_vsce_issue_1107"
  }
}

But installed-check will always fail with:

Unexpected error: Failed to list installed modules: ENOENT: no such file or directory, stat '/home/felipecrs/repos/vscode-shellcheck/node_modules/@vscode/vsce-sign'

Error: Failed to list installed modules
    at file:///home/felipecrs/repos/vscode-shellcheck/node_modules/list-installed/lib/lookup.js:19:11
    at async installedLookup (file:///home/felipecrs/repos/vscode-shellcheck/node_modules/list-installed/lib/lookup.js:15:21)
    at async workspaceLookup (file:///home/felipecrs/repos/vscode-shellcheck/node_modules/list-installed/lib/lookup.js:54:23)
    at async installedCheck (file:///home/felipecrs/repos/vscode-shellcheck/node_modules/installed-check-core/lib/installed-check.js:35:20)
    at async file:///home/felipecrs/repos/vscode-shellcheck/node_modules/installed-check/cli.js:137:18
caused by: Error: ENOENT: no such file or directory, stat '/home/felipecrs/repos/vscode-shellcheck/node_modules/@vscode/vsce-sign'
    at async stat (node:internal/fs/promises:1032:18)
    at async file:///home/felipecrs/repos/vscode-shellcheck/node_modules/list-installed/lib/fs.js:27:28

Even if installed-check --ignore=@vscode/vsce-sign.

My workaround is to avoid calling installed-check for now.

@felipecrs felipecrs changed the title Error: Failed to list installed modules Error: Failed to list installed modules even if ignored Dec 30, 2024
@voxpelli
Copy link
Owner

This error comes from the module that lists all installed modules, a list that's then compared to the package.json, so it happens before any ignores are applied.

This is the relevant piece of code: https://github.com/voxpelli/list-installed/blob/3ffd5ba045414226f9bac0ae8620afaaeb257923/lib/fs.js#L27

Are you making an override to a folder that does not exist? That seems to not be a case that is handled right now.

Can you try doing an override to a folder that exists? I'll file a follow up issue in list-installed

Thanks for the report and for kind words 🙏 Happy to know this module helps people!

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

2 participants