I installed salesforce cli and when I run the sfdx command on the command window, I am getting this error:
PS C:\\Users\\as67934\> sfdx
node:internal/modules/cjs/loader:1247
throw err;
^\
Error: Cannot find module 'C:\Users\as67934\undefined'
at Function._resolveFilename (node:internal/modules/cjs/loader:1244:15)
at Function._load (node:internal/modules/cjs/loader:1070:27)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
code: 'MODULE_NOT_FOUND',
requireStack: \[\]
}\
I tried reinstalling salesforce cli and VS Code still getting the same error. Do we need node.js to be installed for this?
Installed Salesforce CLI
Even I faced the same problem a few hours ago.
Got to know the sdfx command is old and not supported in certain OS.
Try using sf instead.
Worked for me!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With