When I run the command browserify on the terminal after I install it on windows, it shows the error message browerify : The term ‘browerify’ is not recognized as the name of a cmdlet, function, script file, or operable program. This article will tell you how to fix it.
1. How To Fix Error The term is not recognized as the name of a cmdlet, function, script file, or operable program.
- I install Browserify by executing the command npm install -g browserify in the terminal.
- After that, when I run the command browserify in the terminal, it shows the error message like below.
browerify : The term 'browerify' 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 + browerify + ~~~~~~~~~ + CategoryInfo : ObjectNotFound: (browerify:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
- After some research, I finally find the method to fix this error.
- Right-click the Windows PowerShell program, then click the menu item Run as administrator in the popup menu list.
- Click the Yes button on the popup dialog to go to the PowerShell window.
- Run the command Set-ExecutionPolicy RemoteSigned in the PowerShell window like below.
PS C:\Windows\system32> Set-ExecutionPolicy RemoteSigned Execution Policy Change The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): y PS C:\Windows\system32>
- Now when you run the command browserify in the terminal, the error has been fixed.