3

I am trying to set up sfp by following: flxbl Docs

Ran this command:

npm i -g @flxbl-io/sfp

Output:

changed 546 packages in 5m

63 packages are looking for funding
  run `npm fund` for details

As mentioned in step B in flxbl Docs, ran below command: sfp --version But getting the error output like below:

sfp : The term 'sfp' is not recognized as the name of a cmdlet, function, script file, or operable program. 
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.        
At line:1 char:1
+ sfp --version
+ ~~~
    + CategoryInfo          : ObjectNotFound: (sfp:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Is anybody aware of this issue?

2
  • Hi, I see that using sfp required prerequisites docs.flxbl.io/sfp/getting-started/pre-requisites Including installation in Salesforce Org with sfpowerscripts-artifact Unlocked Package installed.
    – arnaud
    Commented Jun 18 at 11:59
  • I have installed sfpowerscripts-artifact unlocked package in the org before installing flxbl-io/sfp in local machine. Commented Jun 18 at 12:58

1 Answer 1

2

Most likely, your PATH is set up incorrectly. To verify this is the case, try the following command in your shell:

(Get-Command sfp).Path

I expect you should get an error as follows:

Get-Command : The term 'sfp' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:2

You can also verify this by checking your path variable:

echo $env:path

You should get a semi-colon-separated list of directories, one of which should read:

C:\Users\<<your-username-here>>\AppData\Roaming\npm

If you don't see this path, that's a configuration problem. To fix it, let's first identify your roaming profile path:

echo $env:appdata

It should give you a path similar to C:\Users\<<your-username-here>>\AppData\Roaming. Copy this path to your clipboard for the next step.

Now, right-click on the Start/Windows button, click on System, under Device Specifications, choose Advanced System Settings.

Next, click on Environment Variables..., then click on Path, click on Edit beneath the variable list, click on New, paste the path into the text box, and add \npm to the end. It should look like the first path I mentioned above. Click OK on each of the three dialogs to save your changes.

You may need to restart your PowerShell terminal/VS Code/etc for this change to take effect.

You must log in to answer this question.

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