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

bug: Error: Cannot find module './keytar-VMICNFEJ.node' #4736

Closed
wesrice opened this issue Jul 1, 2024 · 1 comment
Closed

bug: Error: Cannot find module './keytar-VMICNFEJ.node' #4736

wesrice opened this issue Jul 1, 2024 · 1 comment
Labels
bug Something isn't working clients/vscode Stale

Comments

@wesrice
Copy link

wesrice commented Jul 1, 2024

Version

@sourcegraph/[email protected]

Describe the bug

When trying to use Cody agent, I encounter an error Error: Cannot find module './keytar-VMICNFEJ.node'.

Here is the full trace:

Need to install the following packages:
@sourcegraph/[email protected]
Ok to proceed? (y) y
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
node:internal/modules/cjs/loader:1143
  throw err;
  ^

Error: Cannot find module './keytar-VMICNFEJ.node'
Require stack:
- ~/.npm/_npx/f3e62f8c44d4f6af/node_modules/@sourcegraph/cody-agent/dist/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
    at Module._load (node:internal/modules/cjs/loader:981:27)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at ../node_modules/.pnpm/[email protected]/node_modules/keytar/lib/keytar.js (~/.npm/_npx/f3e62f8c44d4f6af/node_modules/@sourcegraph/cody-agent/dist/index.js:93668:19)
    at __require (~/.npm/_npx/f3e62f8c44d4f6af/node_modules/@sourcegraph/cody-agent/dist/index.js:13:50)
    at src/cli/auth/secrets.ts (~/.npm/_npx/f3e62f8c44d4f6af/node_modules/@sourcegraph/cody-agent/dist/index.js:99603:29)
    at __init (~/.npm/_npx/f3e62f8c44d4f6af/node_modules/@sourcegraph/cody-agent/dist/index.js:10:56)
    at src/cli/auth/AuthenticatedAccount.ts (~/.npm/_npx/f3e62f8c44d4f6af/node_modules/@sourcegraph/cody-agent/dist/index.js:99721:5)
    at __init (~/.npm/_npx/f3e62f8c44d4f6af/node_modules/@sourcegraph/cody-agent/dist/index.js:10:56) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '~/.npm/_npx/f3e62f8c44d4f6af/node_modules/@sourcegraph/cody-agent/dist/index.js'
  ]
}

Expected behavior

I expect npx @sourcegraph/cody-agent help to install and show the CLI usage as mentioned in https://github.com/sourcegraph/cody/tree/main/agent#releases.

Additional context

For what it's worth, npx @sourcegraph/[email protected] help works as expected.

I'm also generally curious about the usage of the Keytar dependency, considering that it is archived and no longer maintained. There are a few linked PRs in Keytar's farewell issue that show how others are now handling this implementation. It seems like Electron's safeStorage api is a viable option, but it's unclear how this impacts password storage for CLI usage.

See also - microsoft/vscode-discussions#748

@wesrice wesrice added bug Something isn't working clients/vscode labels Jul 1, 2024
Copy link

This issue is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days.

@github-actions github-actions bot added the Stale label Aug 31, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working clients/vscode Stale
Projects
None yet
Development

No branches or pull requests

1 participant