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
Sahan Silva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2
This error occurs because PowerShell has restricted script execution for security reasons.
Steps to Fix:
-
Open PowerShell as Administrator
-
Check Current Execution Policy
Get-ExecutionPolicy
If it shows Restricted, you need to change it.
-
Set Execution Policy to Unrestricted
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
-
Verify the Change: run this cmd
enter code here
-
Retry the npx Command
npx create-react-app .
Saikiran Deekonda is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
here’s. I solve these problem using easy and quick steps
-
Type Set-ExecutionPolicy -Scope CurrentUser
-
Type RemoteSigned
-
Then Yes as Y type
then solved the error
Sahan Silva is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.