Free Fone
Free Fone

Reputation: 111

ionic : File C:\Users\Admin\AppData\Roaming\npm\ionic.ps1 cannot be loaded because running scripts is disabled on this system

ionic : File C:\Users\Admin\AppData\Roaming\npm\ionic.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

Upvotes: 10

Views: 23372

Answers (4)

Mayank Singh
Mayank Singh

Reputation: 43

For Windows:-

PowerShell's execution policy is a safety feature that controls the conditions under which PowerShell loads configuration files and runs scripts. This feature helps prevent the execution of malicious scripts.

Execution Policies Link :- Microsoft Execution Policies

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Read about_Execution_Policies from Microsoft site. Before directly running any script in your terminal.

Upvotes: 1

Deepak Singh
Deepak Singh

Reputation: 1145

if you using yarn

 Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Upvotes: 0

Hamid Araghi
Hamid Araghi

Reputation: 454

Simply delete the file ionic.ps1 from its location "C:\Users\Admin\AppData\Roaming\npm\ionic.ps1"

Upvotes: 1

kunal shaktawat
kunal shaktawat

Reputation: 1520

Run the following command in same terminal

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Upvotes: 73

Related Questions