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."


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


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

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

Answered By – Esperento57

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published