memostack
article thumbnail
블로그를 이전하였습니다. 2023년 11월부터 https://bluemiv.tistory.com/에서 블로그를 운영하려고 합니다. 앞으로 해당 블로그의 댓글은 읽지 못할 수 도 있으니 양해바랍니다.
반응형

registry 설정과 마찬가지로 사내에서 개발하다보면 proxy를 설정해야하는 상황이 발생하기도 한다.

proxy 설정을 할때는 npm config set 또는 yarn config set을 이용한다.

 

프록시 설정

본 글에서는 npmyarn을 사용해서 프록시 설정하는 방법을 모두 소개한다.

 

using npm

> npm config set proxy http://username:password@host:port
> npm config set https-proxy http://username:password@host:port

 

using yarn

> yarn config set proxy http://username:password@host:port
> yarn config set https-proxy http://username:password@host:port

 

(사실 설정하는 방법은 npm이나 yarn이나 비슷하다)

 

설정 확인

설정을 다했으면 npm config list 또는 yarn config list로 확인해본다.

yarn config list

 

만약 잘못 설정했다면 yarn config delete proxy 명령어를 이용해서 설정을 지울 수 있다
반응형
블로그를 이전하였습니다. 2023년 11월부터 https://bluemiv.tistory.com/에서 블로그를 운영하려고 합니다. 앞으로 해당 블로그의 댓글은 읽지 못할 수 도 있으니 양해바랍니다.
profile

memostack

@bluemiv_mm

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!