0
Error: Cannot find module '../dist/versions'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> 

(C:\Users\Demo\AppData\Local\sfdx\client\bin\sfdx.js:7:1)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
4

1 Answer 1

-1

By deleting the client folder located somewhere at C:\Users\Demo\AppData\Local\sfdx\client, it worked. I was getting the same error of 'Cannot find module'. This client folder contained some node js files.

2
  • running the commands sfdx update and sfdx plugins:install salesforcedx@latest didnt resolve the issue, but deleting the client folder and then running the commands resolved the issue
    – Prady
    Aug 12, 2019 at 9:56
  • 1
    Deleting client directory helped me. Nov 6, 2023 at 6:35

You must log in to answer this question.

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