Language/Nodejs

json-server --watch실행시 executionpolicy에러 해결방법

이웃비 2022. 4. 16. 16:10

윈도우에서 json-server를 설치하고 연습예제를 실행하려는데 다음과 같이 에러가 났다

json-server --watch db.json

권한이 없나보다.

 

해결방법

 

1. powerShell을 검색 - '관리자 모드' 로 실행

 

2. 다음과 같이 입력

  1. executionpolicy

  2. set-executionpolicy unrestricted

  3. y

 

3. 돌아가서 다시 실행하면 정상적으로 파일을 로딩해오는 걸 확인할 수 있다

해결완료!