문제
Windows 11의 VSCode에서 터미널을 사용해 express 스크립트를 실행하려 했더니, 다음과 같은 PowerShell 오류가 발생했습니다:
cannot be loaded because running scripts is disabled on this system.For more information, seeabout_Execution_Policies at https: /go.microsoft.com/fwlink /? LinkID = 135170.At line: 1 char: 1 + nodemon server + ~~~~~~~ + CategoryInfo : SecurityError: (:)[], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess해당 링크는 저에게는 작동하지 않았습니다.
다행히도 간단한 해결 방법이 있습니다.
해결 방법
설정 > 시스템 > 개발자용으로 이동합니다.
PowerShell 항목을 찾은 다음, 이 옵션을 켭니다:
실행 정책 변경. -> 켜기
이제 스크립트를 다시 실행하면 정상적으로 작동할 것입니다. 처음 실행할 때는 실행 권한을 요청하는 메시지가 표시될 수 있습니다.