본문 바로가기

문제 발생 및 해결

PowerShell에서 Node-RED 실행할 때 에러 발생

node-red 실행할 때 cmd에서는 문제 없었음.

PowerShell에서 실행하려니 아래처럼 에러 발생

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

 

1. 현재 상태 확인

> Get-ExecutionPolicy

Restricted로 나옴. (RemoteSigned여야 가능)

 

2. 상태 변경

> Set-ExecutionPolicy RemoteSigned

 

3. 재확인

> Get-ExecutionPolicy

RemoteSigned로 나오는 것 확인.