IC2 Can't find CLI installed with NPM (cannot find path specified)

35 views
Skip to first unread message

Tyler Edmonds

unread,
Sep 6, 2023, 9:27:17 AM9/6/23
to Illuminated Cloud General Discussion
Hello! 

Installing the SF-CLI directly in Program Files and setting that in the configuration for IC2 works just fine.  

I recently moved over to using Node/NPM in my environment and installed the SF-CLI via NPM. I updated the IC2 config to point to the NPM install of SF-CLI but I keep getting an error. 

`The system cannot find the path specified` 
and
2023-09-06 09_25_23-Clipboard.png

The directory for the new CLI is C:\Users\tyler\AppData\Roaming\npm\sf.cmd

I'm assuming it can't find it because of it being in AppData.  Is there a way to get this working? Am I missing something obvious here? 
Or is IC2 locked into using the Windows Installer version? 

Thanks!


Scott Wells

unread,
Sep 6, 2023, 9:40:17 AM9/6/23
to Illuminated Cloud General Discussion, Tyler Edmonds
Hi. There shouldn't be any issue with a CLI installed via NPM. However, what script is IC2 being directed to use? It should be configured for sfdx and not sf, though I don't know for a fact that the latter would be an issue since it also supports the "older" colon-delimited commands, e.g., force:org:list.

If you want to enable debug logging for Salesforce DX and reproduce the issue, I'm happy to take a look at the resulting idea.log to see what's going on. You can send it to sup...@illuminatedcloud.com for review.

Regards,
Scott Wells

Scott Wells

unread,
Sep 6, 2023, 1:25:16 PM9/6/23
to Illuminated Cloud General Discussion, Scott Wells, Tyler Edmonds
Closing the loop here. With Tyler's help, we've managed to corner the problem. I wasn't able to reproduce the error under what should be the exact same conditions as Tyler, but he was able to help confirm the prospective fix which is to include the user home directory before the script parent directory when choosing a working directory for CLI execution in the absence of a project directory context. More details are available here for the curious:


The fix will be included in tomorrow's build, 2.2.8.2, and of course in all subsequent builds.

Regards,
Scott Wells
Reply all
Reply to author
Forward
0 new messages