CLI Connection is broken

Issue #2478 resolved
Luke Buthman created an issue

Hi Scott, this just started happening this morning. It was working and then it stopped. I tried updating the latest SF CLI version. I also ran any updates available for IC and IJ. Basically, all the cli connections are broken. I have tried pointing to sf.cmd instead of sfdx.cmd, no luck. I don’t understand the error message. If I try to create a new connection, I immediately get an error “No response found from org authorization.”

node:internal/errors:497 ErrorCaptureStackTrace(err); ^ TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for C:\Program Files\sf\client\bin\run. Loading extensionless files is not supported inside of "type":"module" package.json contexts. The package.json file C:\Program Files\sf\client\package.json caused this "type":"module" context. Try changing C:\Program Files\sf\client\bin\run to have a file extension. Note the "bin" field of package.json can point to a file with an extension, for example {"type":"module","bin":{"run":".\bin\run.js"}} at new NodeError (node:internal/errors:406:5) at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:99:9) at defaultGetFormat (node:internal/modules/esm/get_format:142:36) at defaultLoad (node:internal/modules/esm/load:120:20) at ModuleLoader.load (node:internal/modules/esm/loader:396:13) at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:56) at new ModuleJob (node:internal/modules/esm/module_job:65:26) at #createModuleJob (node:internal/modules/esm/loader:290:17) at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:248:34) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:229:17) { code: 'ERR_UNKNOWN_FILE_EXTENSION' } Node.js v20.9.0

Comments (6)

  1. Luke Buthman reporter

    It must be something with the SF CLI as I cannot even run sf --version. I tried uninstalling and reinstalling it, but no luck.

  2. Scott Wells repo owner

    I imagine it’s not much consolation, but I just updated to today’s CLI release (2.21.7.xxx) on my Windows, Mac, and Linux machines, and all of them are working properly. My guess is that you have a corrupted CLI install and hopefully a scorched earth reinstall will put you back into a good state.

  3. Scott Wells repo owner

    I'm going to resolve this here since it's occurring outside of IC2 as well, but I'm happy to continue the troubleshooting dialog in this issue until you have a resolution.

  4. Scott Wells repo owner

    My pleasure. I’ll let the CLI team know that your in-place update led to that issue and the need for a scorched earth reinstall.

  5. Log in to comment