0

I am trying to install salesforce code scanner with sf plugins install @salesforce/sfdx-scanner but I am getting an error:

NpmError: Failed to find @salesforce/sfdx-scanner@latest in the registry

sf --version gives:

@salesforce/cli/2.22.7 linux-x64 node-v20.14.0

If I try to update sf cli with sudo npm update --global @salesforce/cli I get:

npm error code 1
npm error path /usr/local/lib/node_modules/@salesforce/cli
npm error command failed
npm error command sh -c node ./scripts/preinstall.js

I have the sf cli globally installed.

Any ideas?

1 Answer 1

0

Can you try the following ?

sudo npm install @salesforce/cli@latest -g
1
  • Same error, this is from the npm debug log 173 verbose stack Error: command failed 173 verbose stack at ChildProcess.<anonymous> (/snap/node/8723/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27) 173 verbose stack at ChildProcess.emit (node:events:519:28) 173 verbose stack at maybeClose (node:internal/child_process:1105:16) 173 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
    – jani_r
    Commented Jul 3 at 5:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .