LoginSignup
15
16

More than 5 years have passed since last update.

Atom で Package のインストールに失敗する件と解決方法

Last updated at Posted at 2014-02-28

背景

vim-mode 入れたかったんだけど、node 弱者のためすんなり行かなかったのでメモしておく。

問題

自分の環境だと Preferences -> Packages で install ボタンを押しても、apm install <package>でも上手く行かず、以下のエラーログが表示された。
どうもオレオレ証明書があるらしくて動かないっぽい。

Installing “command-logger@0.15.0” failed. Less…

npm http GET https://registry.npmjs.org/d3-browserify/3.3.13
npm http GET https://registry.npmjs.org/humanize-plus
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/humanize-plus
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/d3-browserify/3.3.13
npm http GET https://registry.npmjs.org/humanize-plus
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/d3-browserify/3.3.13
npm ERR! Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR!     at TLSSocket.<anonymous> (_tls_wrap.js:777:36)
npm ERR!     at TLSSocket.EventEmitter.emit (events.js:98:17)
npm ERR!     at TLSSocket._finishInit (_tls_wrap.js:337:8)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/isaacs/npm/issues>

解法

追記:オレオレ証明書を使わない方法が公式にありました(Thanks @shuhei@github)。
ということで以下2つのどちらかで解決できます。

  • npm のバージョンを上げる
    npm install npm -g --ca=""

  • npm にオレオレ証明書を使わないように設定する
    npm config set ca=""

まとめ

ということで無事 vim-mode が使えるようになった。これで使える!
Chrome のデベロッパーツールが表示されたりして中々面白いエディタかも。

参考リンク

http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more
http://discuss.atom.io/t/apm-npm-issue-installing-packages/1715/5
http://stackoverflow.com/questions/9626990/receiving-error-error-ssl-error-self-signed-cert-in-chain-while-using-npm

15
16
2

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
15
16