Skip to content

Cannot find module error #849

@komyg

Description

@komyg

Hi,

I tried to install your CLI tool on my environment, and I got this error:

socket help
✧︎ 
Socket CLI Error: Error: Cannot find module '@socketsecurity/registry'
Require stack:
- /Users/felipe/.socket/_dlx/d51e7834cb6bdb7c/node_modules/@socketsecurity/cli/build/cli-runtime-15526.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Function._load (node:internal/modules/cjs/loader:1055:27)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
    at Module.require (node:internal/modules/cjs/loader:1311:12)
    at require (node:internal/modules/helpers:136:16)
    at ../../node_modules/.pnpm/@socketregistry+packageurl-js@1.3.0/node_modules/@socketregistry/packageurl-js/dist/index.js (/Users/felipe/.socket/_dlx/d51e7834cb6bdb7c/node_modules/@socketsecurity/cli/build/cli-runtime-15526.js:151729:21)
    at __require (/Users/felipe/.socket/_dlx/d51e7834cb6bdb7c/node_modules/@socketsecurity/cli/build/cli-runtime-15526.js:15:51)
    at src/utils/purl/parse.mts (/Users/felipe/.socket/_dlx/d51e7834cb6bdb7c/node_modules/@socketsecurity/cli/build/cli-runtime-15526.js:151805:36)
    at __init (/Users/felipe/.socket/_dlx/d51e7834cb6bdb7c/node_modules/@socketsecurity/cli/build/cli-runtime-15526.js:12:56) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/felipe/.socket/_dlx/d51e7834cb6bdb7c/node_modules/@socketsecurity/cli/build/cli-runtime-15526.js'
  ]
}
Bootstrap error: command failed

I tried to manually install the @socketsecurity/registry package, but I got the same error.

I also tried in two different version of node, but it didn't work:

Node: v20.18.1
NPM: 10.8.2

Node: v22.14.0
NPM: 10.9.2

Can you help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions