255
257

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Node.js] npm の proxy と registry 設定

Last updated at Posted at 2014-07-10

npm の proxy と registry 設定

社内環境で、いつも問題になるので覚え書き。

proxy と https-proxy だけでだめなら registry を設定している。

※以下、プロキシサーバを http://proxyserver:8080 と記述している。

$ npm -g config set proxy http://proxyserver:8080
$ npm -g config set https-proxy http://proxyserver:8080
$ npm -g config set registry http://registry.npmjs.org/
$ npm config list

Linux では proxy と https-proxy の設定だけで問題は起きていない。
Windows では registry も https から http に変更しないと動かない。

Windows では以下の様なBAT/CMDスクリプトファイルを用意すると良い。

call npm -g config set proxy http://proxyserver:8080
call npm -g config set https-proxy http://proxyserver:8080
call npm -g config set registry http://registry.npmjs.org/
call npm config list
pause
255
257
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
255
257

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?