skip to Main Content

npx : File C:Program Filesnodejsnpx.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1

  • npx create-react-app .
  •   + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess
    
    

I encountered this error, Need to fix error

2

Answers


  1. Chosen as BEST ANSWER

    here's. I solve these problem using easy and quick steps

    1. Type Set-ExecutionPolicy -Scope CurrentUser

    2. Type RemoteSigned

    3. Then Yes as Y type

    then solved the error


  2. This error occurs because PowerShell has restricted script execution for security reasons.

    Steps to Fix:

    1. Open PowerShell as Administrator

    2. Check Current Execution Policy

      Get-ExecutionPolicy

      If it shows Restricted, you need to change it.

    3. Set Execution Policy to Unrestricted

      Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

    4. Verify the Change: run this cmd

      enter code here

    5. Retry the npx Command

      npx create-react-app .

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search