You need to sign in to do that
Don't have an account?

salesforce cli not working
I have installed salesforce cli but when I am trying to execute any sfdx command. it is giving me error:
I tried reinstalling salesforce cli, updating nodejs, resintalling vscode. Nothing worked.
Please let me know if anybody has any solution to this.
internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module '../dist/versions' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (C:\Users\SharmSc\AppData\Local\sfdx\client\bin\sfdx.js:15:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3)i am not able to use sfdx/vscode because of this blocker.
I tried reinstalling salesforce cli, updating nodejs, resintalling vscode. Nothing worked.
Please let me know if anybody has any solution to this.
Have you checked the approaches mentioned in the post https://salesforce.stackexchange.com/questions/222566/sfdx-6-21-0-9db990b3c9-and-current-update-error-sfdx-no-longer-works
https://github.com/heroku/cli/issues/666
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Thanks for the response.
I have tried deleting client directory. It worked fine after that, however the cli has started giving warning about the outdated cli version 6.44. And if I update the version to latest i.e 7.63 it stops working and throws same error.
It seems the issue is with the 7.63 cli release.
By default, the CLI periodically checks for and installs updates. Until a fix for the current version has been rolled out, you could disable auto-update, by setting the SFDX_AUTOUPDATE_DISABLE environment variable in your OS to true.
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you