Node.js 관련 구성
npm 전역 설치 경로 및 캐시 경로 구성
nvm 루트 디렉토리에 node_cache 및 node_global 두 개의 새 폴더를 만듭니다. 이전에 npm을 설치하지 않은 경우 nvm install --lts를 사용하여 최신 안정 버전을 설치하고 nvm use <version-number>로 사용하거나 nvm install <version-number>로 버전을 지정할 수 있습니다.
npm cache 및 prefix 경로 구성
bash
npm config set cache "D:\nvm\node_cache"
npm config set prefix "D:\nvm\node_prefix"npm 캐시 및 전역 설치 경로 확인
bash
npm config get cache
npm config get prefixnpm 레지스트리 확인
bash
npm config get registrynpm 레지스트리 구성
bash
npm config set registry https://registry.npmmirror.com사용 가능한 레지스트리 미러
- Taobao NPM 미러: https://registry.npmmirror.com
- cnpm 미러: http://r.cnpmjs.org
- 공식 npm 레지스트리: https://registry.npmjs.org
- Tencent Cloud NPM 미러: https://mirrors.cloud.tencent.com/npm/ (사용 가능한 더 많은 미러는 사용 가능한 오픈 소스 미러를 방문하세요)
- Huawei Cloud NPM 미러: https://mirrors.huaweicloud.com/repository/npm/
- 베이징 외국어 대학교 미러: https://mirrors.bfsu.edu.cn/nodejs-release/npm/