December 9, 2021

[Issue Resolved]: The term 'yo' is not recognized as the name of a cmdlet, function, script file or operable program

Introduction:

In this blog, we will see how can we resolve the error The term 'yo' is not recognized as the name of a cmdlet, function, script file, or operable program. Generally, this error occurs while we have set up a new environment for SPFx development.

Reason:

The reason for this error was the wrong path was selected in the user path environment variable.

Solution:

Follow the below steps to resolve this error:

Step 1) Open the start menu and search for the 'environment'. Now select the Edit the system environment variables.

Step 2) Now go to the Advanced tab and click on Environment Variables.

Step 3) On clicking Environment Variables, it will open another popup. Now select the PATH variable and click on the Edit button.

Step 4) On clicking the Edit button, it will open another popup.

Step 5) Now in Variable value, add the below path and click on the OK button:

  • C:\Users\{username}\AppData\Roaming\npm
    • Note: Replace {username} with your username.

Step 6) Now click on the OK button in Environment Variable and System properties popups.

Step 7) Restart the command prompt, and the issue will be resolved.

Conclusion:

This is how we can resolve the issue “The term 'yo' is not recognized”. Hope this helps!

If you have any questions you can reach out our SharePoint Consulting team here.

1 comment: