[21-02-24 TIL] vscode에서 tsc 에러

O2o2✨·2021년 1월 24일
0

TIL

목록 보기
1/25

vscode에서 콘솔창에 tsc 명령어 사용했을때 에러

문제

tsc main.ts했을 때 나온 에러

tsc : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\~~~~\npm\tsc.ps1 파일을 로 
드할 수 없습니다. 자세한 내용은 about_Execution_Policies(https://go.microsoft.com/fwlink/?LinkID=13517 
0)를 참조하십시오.
위치 줄:1 문자:1
+ tsc main.ts
+ ~~~
    + CategoryInfo          : 보안 오류: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

해결

https://dog-developers.tistory.com/183 를 보고 해결

Windows PowerShell을 관리자 권한으로 실행 후 다음을 입력
get-help Set-ExecutionPolicy
y

Set-ExecutionPolicy RemoteSigned
y

profile
리액트 프론트엔드 개발자입니다.

0개의 댓글