概要
- proxy 環境下でもATOM を使いたい
基本設定
- この人を信じれば基本的には問題ない
これによる弊害
- ATOM 1.0系だとインストール出来ない
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@0.10.35 | darwin | x64
gyp http GET https://atom.io/download/atom-shell/v0.22.0/node-v0.22.0.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error
gyp ERR! stack Error: tunneling socket could not be established, cause=Parse Error
gyp ERR! stack at ClientRequest.onError (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:168:17)
gyp ERR! stack at ClientRequest.g (events.js:180:16)
gyp ERR! stack at ClientRequest.emit (events.js:95:17)
gyp ERR! stack at Socket.socketOnData (http.js:1593:9)
gyp ERR! stack at TCP.onread (net.js:528:27)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "install" "--target=0.22.0" "--dist-url=https://atom.io/download/atom-shell" "--arch=x64" "--ensure" "--proxy=http://proxy.url:0129"
gyp ERR! cwd /Users/gessy0129
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
対応方法
- issueを信じる
- 自分の環境では以下を設定に追加
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
環境のメモ
MacBookPro OS X 10.10.5
$ apm --version
sh
apm 1.0.1
npm 2.5.1
node 0.10.35
python 2.7.10
git 2.3.2
$ apm config ls
sh
; cli configs
globalconfig = "/Users/gessy0129/.atom/.apm/.apmrc"
user-agent = "npm/2.5.1 node/v0.10.35 darwin x64"
userconfig = "/Users/gessy0129/.atom/.apmrc"
; userconfig /Users/gessy0129/.atom/.apmrc
http-proxy = "http://proxy.url:0129"
https-proxy = "http://proxy.url:0129/"
proxy = "http://proxy.url:0129/"
strict-ssl = false
; globalconfig /Users/gessy0129/.atom/.apm/.apmrc
cache = "/Users/gessy0129/.atom/.apm"
; node bin location = /Applications/Atom.app/Contents/Resources/app/apm/bin/node
; cwd = /Users/gessy0129
; HOME = /Users/gessy0129/.atom/.node-gyp
; 'npm config ls -l' to show all defaults.
補足
- proxy のURL とport は適当なので修正してくださいね