0
votes

PS D:\React\counter-app> create-react-app tower create-react-app : File C:\Users\ee209495\AppData\Roaming\npm\create-react-app.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1 + create-react-app tower + ~~~~~~~~~~~~~~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess

3

3 Answers

0
votes

Try executing the console with admin credentials. You might not have permissons while trying to execute npm commands. i would also recommend to use npx create-reaact-app myapp. This provides a previous check to see if you had already installed react packages, if not, it will install them for you.

Hope it helps. Regards,

0
votes

Try following steps:

  1. Go to Start Menu and search for "Windows PowerShell ISE".
  2. Right click the x86 version and choose "Run as administrator".
  3. In the top part, paste Set-ExecutionPolicy RemoteSigned; run the script. Choose "Yes".
  4. Repeat these steps for the 64-bit version of Powershell ISE too (the non x86 version).
0
votes

this problem because of security feature in your system. 1. Open powershell as an administrator. 2. Run the following command set-executionpolicy remotesigned 3. Try again.