Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tsc.ps1 cannot be loaded because running scripts is disabled on this system

On PowerShell, I got the error message when executing tsc. This never happened before.

I am not sure should I mingle with the PowerShell security settings to rectify this such as based on this one: PowerShell says "execution of scripts is disabled on this system."

Update

This is a new intended feature by npm to use ps1 scripts. A question has been raised in their repo: https://github.com/npm/cli/issues/470

like image 976
Cerlancism Avatar asked Nov 11 '19 06:11

Cerlancism


1 Answers

You can run this in PowerShell command. Be sure to run it as administrator:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned 
like image 139
Esperento57 Avatar answered Oct 01 '22 19:10

Esperento57