====== node.js npm ======
* [[https://www.npmjs.org/| node.js package manager]]
* see [[node.js:wireit|Wireit]]
* [[node.js:yarn|yarn]]
===== package-lock.json =====
* ''package-lock.json'' 은 소스코드 버전관리시스템으로 관리해야만 한다.
* 안그러면 각 개발자별로, 혹슨 의존성 설치 시점에 따라 서로 다른 패키지를 설치하게 되어 버그 유발 요인이 된다.
* [[https://www.hamadevelop.me/packagelock/|또 depedency 버전을 잘못 설치하고 말았다. | Hama Develop]]
===== Proxy =====
* [[http://jjasonclark.com/how-to-setup-node-behind-web-proxy/|How to setup Node.js and Npm behind a corporate web proxy]]
* [[http://wil.boayue.com/blog/2013/06/14/using-npm-behind-a-proxy/|Using npm behind a corporate proxy - Wil Boayue]]
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
# or
export npm_config_proxy http://proxy.company.com:8080
export npm_config_https_proxy http://proxy.company.com:8080
# or
npm --https-proxy=http://proxy.company.com:8080 -g install karma
* [[http://stackoverflow.com/questions/7559648/is-there-a-way-to-make-npm-install-the-command-to-work-behind-proxy|node.js - Is there a way to make npm install (the command) to work behind proxy? - Stack Overflow]] npm을 프록시를 통해 http로 서빙하기
npm config set strict-ssl false
npm config set registry "http://registry.npmjs.org/"
npm --proxy http://username:password@cacheaddress.com.br:80 install packagename
===== Windows에서 NPM 빌드 =====
* [[https://github.com/felixrieseberg/windows-build-tools|felixrieseberg/windows-build-tools: Install C++ Build Tools for Windows using npm]]
==== 참조 ====
* [[https://www.sitepoint.com/10-npm-tips-and-tricks/|10 Tips and Tricks That Will Make You an npm Ninja]]
===== 일반적인 개발 흐름 =====
# package.json 디렉토리로 이동
npm install
npm run build
npm start server
# 혹은 Server가 뜬 상태에서 incremental build
npm start watch
===== 참조 =====
* [[https://dev.to/adrianbdesigns/published-my-first-npm-package-here-s-what-i-learned-49j6?utm_medium=social|Published my first NPM package - here's what I learned - DEV Community]]
* [[https://devblog.croquis.com/ko/2022-03-07-1-npm-private-repository/|사내 npm 패키지 저장소를 구축하기 위해 겪었던 과정들]]