create-react-app : File C:\Users\samar\AppData\Roaming\npm\create-react-app.ps1 cannot be loaded because running scripts is disabled on this system

Updated at 21-Aug-2022, By samar

create-react-app : File C:UserssamarAppDataRoaming pmcreate-react-app.ps1 cannot be loaded because running scripts is disabled on this system

In this tutorial, we will try to find the solution to "create-react-app : File C:UserssamarAppDataRoaming pmcreate-react-app.ps1 cannot be loaded because running scripts is disabled on this system" through programming.

Getting error `create-react-app : File C:\Users\samar\AppData\Roaming\npm\create-react-app.ps1 cannot be loaded because running scripts is disabled on this system` in my react app.
  • Open terminal as an administrator and run below command to get the solution for error create-react-app : File C:\Users\samar\AppData\Roaming\npm\create-react-app.ps1 cannot be loaded because running scripts is disabled on this system.

    Move to your project root directory and run below command.

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
    

    If you aren't able to run the command as an administrator, try running it with the CurrentUser parameter.

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    

Back to code snippet queries related nodejs