-
[PowerShell] yarn : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\user\AppData\Roaming\npm\yarn.ps1 파일을 로드할 수 없습니다.💡 개발 이슈와 해결/📚 누군가를 위한 기록 2022. 9. 27. 15:46
문제
컴퓨터를 바꿔가면서 이것 저것 작업 중인데
다른 환경에서 vscode를 깔고
yarn 을 설치하고
yarn start를 실행하니 아래와 같은 에러가 나왔다.
yarn start 후 뜬 에러 yarn : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\user\AppData\Roaming\npm\yarn.ps1 파일을 로드할 수 없습니다. 자세한
로드할 수 없습니다. 자세한 내용은 about_Execution_Policies(https://go.microsoft.com/fwlink/?LinkID= 내용은 about_Execution_Policies(https://go.microsoft.com/fwlink/?LinkID=
135170)를 참조하십시오.
위치 줄:1 문자:1
+ yarn start
+ ~~~~
+ CategoryInfo : 보안 오류: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
원인
권한이 없어서 일어나는 에러.
해결
윈도우에서 Windows Powershell을 찾아서 관리자 권한으로 실행한다.
get-help Set-ExecutionPolicy
를 입력하고, Y를 누른다.
그러면 아래 처럼 설치가 된다.
설치가 다 끝나면 아래의 내용도 입력해준다.
Set-ExecutionPolicy RemoteSigned
Y를 누른다.
🎉
yarn start 가 잘 되는 것을 확인 할 수 있다.
🎉
반응형'💡 개발 이슈와 해결 > 📚 누군가를 위한 기록' 카테고리의 다른 글
[react-router-dom] Uncaught TypeError: (0 , react_router_dom__WEBPACK_IMPORTED_MODULE_5__.withRouter) is not a function (0) 2022.10.21 gh-pages로 react app 배포 시, 경로를 참조하지 않을 때 (0) 2022.10.12 Apple에서 악성 소프트웨어가 있는지 확인할 수 없기 때문에 열 수 없습니다 (0) 2022.06.18 XSS(Cross-Site Scripting) 보안 취약점 (0) 2022.01.20 Uncaught ReferenceError: Cannot access 'OOO' before initialization (0) 2021.12.28