TypeScript Bug Or Error: tsc.ps1 cannot be loaded. tsc.ps1 is not digitally signed
Hello,
The details of my machine and the packages installed are:
Operating System: Windows 10 Pro
Node.js: 14.16.0
npm version: 6.14.11
Typescript: 4.2.3
The fix to this issue is in this link Github TypeScript Issue 35606. That is to open MS Powershell in Administrator mode and run the command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine" in C:\Windows\system32>.
Cheers!
Another error that I encountered when running TypeScript programs is "tsc : File C:\Users\gregorye\AppData\Roaming\npm\tsc.ps1 cannot be loaded. The file C:\Users\gregorye\AppData\Roaming\npm\tsc.ps1 is not digitally signed. You cannot run this script on the current system.". The full description of the bug is presented below.
tsc : File C:\Users\gregorye\AppData\Roaming\npm\tsc.ps1 cannot be loaded. The file C:\Users\gregorye\AppData\Roaming\npm\tsc.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1 + tsc -p d:\Greg\Typescript\Ch02\tsconfig.json + ~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command tsc -p d:\Greg\Typescript\Ch02\tsconfig.json" terminated with exit code: 1.
The details of my machine and the packages installed are:
Operating System: Windows 10 Pro
Node.js: 14.16.0
npm version: 6.14.11
Typescript: 4.2.3
The fix to this issue is in this link Github TypeScript Issue 35606. That is to open MS Powershell in Administrator mode and run the command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine" in C:\Windows\system32>.
Cheers!
Thx, fixed it!
ReplyDeleteYou're welcome
Deletety
ReplyDeleteYou're welcome
DeleteAdamsın
ReplyDeleteThanks!
Delete