(NPM) 프록시 저장소 설정
(NPM) 프록시 저장소 설정
NPM 설정 정보 확인
-
간략화된 NPM 설정 정보 확인
-
상세 NPM 설정 정보를 확인하고 싶다면
-l
옵션을 추가하여npm config list -l
로 확인npm config list
NPM 설정 정보 결과
- 간략화된 NPM 설정 정보 확인 결과
- 사용자가 직접 변경하거나 추가한 config 정보에 대해서 출력
1
2
3
4
5
6
7
8
9
10
11
; "builtin" config from /opt/homebrew/lib/node_modules/npm/npmrc
prefix = "/opt/homebrew"
; node bin location = /opt/homebrew/Cellar/node/20.4.0/bin/node
; node version = v20.4.0
; npm local prefix = /Users/youngminjun/DEV_DOC/docker/postgresql
; npm version = 9.8.1
; cwd = /Users/youngminjun/DEV_DOC/docker/postgresql
; HOME = /Users/youngminjun
; Run `npm config ls -l` to show all defaults.
NPM 사용자 설정 위치
- npm 관련 설정을 변경하면 해당 파일에 변경된 설정 정보가 저장
1
${USER_HOME}/.npmrc
NPM 설정 정보 변경
NPM 저장소 변경
- 사설로 구성한
NPM Proxy 저장소
를 설정
1
npm config set registry https://nexus.coolio.so/repositroy/npm-group
NPM 접속 SSL 인증 변경
- 라이브러리 호출시 SSL 인증 방법에 대해서 인증서 검사에 대해서
OFF
설정 SELF_SIGNED_CERT_IN_CHAIN
등의 SSL 인증서 검증 관련 오류시에 필수 처리
1
npm config set strict-ssl false
NPM 업그레이드
- npm에 대해서 최신버전(
latest
)로 재설치(업그레이드)
1
npm install -g npm@latest
This post is licensed under
CC BY 4.0
by the author.