[Issue Resolved]: The Term 'yo' Is Not Recognized As The Name Of A cmd

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 PATH variable and click on 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
  • Replace {username} with your username.

Step 6

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

Step 7

Restart the console, and the issue will be resolved.

Conclusion

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