LoginSignup
13
16

More than 5 years have passed since last update.

OS X El Capitan にしたらgulpの$ npm installでエラーを吐くようになったので。

Posted at

ウキウキでOS X El Capitanにアップデートしたらgulpの$ npm installでエラーを吐くようになってしまったので以下に対処方法を記載しておく。

スクリーンショット 2015-10-21 14.30.52.png

【その1】 Node.jsの再インストール

$ node -v
$ sudo npm cache clean -f
$ sudo npm install -g n
$ sudo n stable
$ node -v

で、再インストール。

【その2】 npmの再インストール

$ npm install -g npm

もし実行中にエラーが出たら、

$ curl -L https://npmjs.org/install.sh | sudo sh

で再インストールできた。

【その3】 Xcodeの初期設定を済ませる

Node.jsとnpmの再インストールも完了したし、いざ$ npm install!したら以下のエラーが。

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

あ、そういえばEl CapitanにしてからXcode起動してないな・・・。
起動後、小さいウィンドウが開くので「Agree」ボタンをポチッとしたら準備完了。

以上の手順で

無事 $ npm install が実行できましたとさ。
とりあえずOSアップデートしてエラー出たらまず再インストールするといいかも。

参考にしたサイト

13
16
0

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