npm, npm nexus, npm nexus repository, npm registry, Yarn, yarn nexus, yarn nexus repository, yarn registry
반응형
사내에 Nexus를 구축해서 쓸경우 사내 Nexus Repository에 있는 라이브러리를 가져올 필요가 있는데 이를 위한 세팅 방법이다.
.npmrc 나 .yarnrc를 프로젝트 root폴더에 만든다. 우선순위는 .npmrc여서 .npmrc만 만들어서 사용한다.
//.npmrc
registry=http://nexusUrl.com/repository/npm-public
_auth=id:password // base64 인코딩해야함
또는, npm/yarn config 명령어로 global하게 Setting할 수 있다.
Terminal 창에 아래의 명령어를 입력하여 사용.
//npm
npm config set _auth id:password // base64 인코딩해야함
npm config set registry http://nexusUrl.com/repository/npm-public
//yarn
yarn config set _auth id:password // base64 인코딩해야함
yarn config set registry http://nexusUrl.com/repository/npm-public
반응형
'Develop > Node.js' 카테고리의 다른 글
[Node.js] Node.js Slack WebHooks (슬랙 웹훅) (1) | 2019.05.03 |
---|---|
[Node.js] google oatuh passport (0) | 2019.03.11 |
Socket IO를 이용한 정말 간단한 채팅 프로그램 (0) | 2019.02.21 |
[Node.js] google oauth 인증 (구글 로그인) (0) | 2019.01.07 |
[Node.js] JWT Token 생성 및 검증 (0) | 2019.01.06 |