I can't install any packages on mac


#1

I can’t install packages on mac.
It shows this:

Installing “atom-html-preview@0.1.19” failed.Hide output…

gyp info it worked if it ends with ok
gyp info using node-gyp@2.0.2
gyp info using node@0.10.40 | darwin | x64
gyp http GET https://atom.io/download/atom-shell/v0.34.5/node-v0.34.5.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! install error
gyp ERR! stack Error: socket hang up
gyp ERR! stack at createHangUpError (http.js:1473:15)
gyp ERR! stack at Socket.socketOnEnd (http.js:1569:23)
gyp ERR! stack at Socket.g (events.js:180:16)
gyp ERR! stack at Socket.emit (events.js:117:20)
gyp ERR! stack at _stream_readable.js:944:16
gyp ERR! stack at process._tickCallback (node.js:448:13)
gyp ERR! System Darwin 15.4.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.34.5” “–dist-url=https://atom.io/download/atom-shell” “–arch=x64” "–ensure"
gyp ERR! cwd /Users/liaoyilin/.atom
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok

Can someone help me?