2

i am trying to install sfdx scanner. its giving me this error. anyone knows this below error

warning "@salesforce/lwc-dev-server > request-promise-native > request-promise-core@1.1.4" has unmet peer dependency "request@^2.34".
C:\Program Files\Salesforce CLI\client\node_modules\yarn\lib\cli.js:78723
    compromised = compromised || function (err) { throw err; };
                                                  ^

Error: Unable to update lock within the stale threshold
    at C:\Program Files\Salesforce CLI\client\node_modules\yarn\lib\cli.js:78645:66
    at FSReqCallback.oncomplete (fs.js:156:23) {
  code: 'ECOMPROMISED'
}
Installing plugin @salesforce/sfdx-scanner... failed
    Error: yarn add @salesforce/sfdx-scanner@latest --non-interactive 
    --mutex=file:C:\Users\XXXXXXX\AppData\Local\sfdx\yarn.lock
    --preferred-cache-folder=C:\Users\XXXXXXXXXX\AppData\Local\sfdx\yarn --check-files       
    exited with code 1

after installing

@salesforce/lwc-dev-server 2.9.0
├─ @oclif/plugin-help 2.2.3
└─ @oclif/plugin-update 1.3.10
evergreen 0.34.0
└─ evergreen-build 0.20.2
(node:14504) [UnknownConfigKey Plugin: sfdx-cli] UnknownConfigKey Plugin: sfdx-cli: Unknown config key: disableTelemetry
module: @oclif/config@1.17.0
task: runHook prerun
plugin: sfdx-cli
root: C:\Program Files\Salesforce CLI\client
See more details with DEBUG=*
1
  • Apparently this is an issue with a yarn timeout that is set too tight. I faced the same problem during sfdx plugin updates and was able to work around it by - running it again and again. Each time the process got a bit further, partially building on the last one. After three or four iterations, the downloads, linking etc. had got so far that it finished successfully inside the timeout. Jul 9, 2021 at 12:07

2 Answers 2

0

Try reinstalling the lwc-dev-server:

npm install -g @salesforce/lwc-dev-server @salesforce/sfdx-scanner

Remove the -g if you only want it installed locally (within the current project).

Add --save-dev if you want to also update your package.json file.

1
  • hi sfdcfox.. thank you for the help.. after installing i checked for sfdx plugins. i didnt find sfdx scanner..there were many deprecated packages while installing... i hv updated above Jan 22, 2021 at 19:13
0

I resolved this issue by restarting Visual Studio Code after installing node.js

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.