LoginSignup
0
1

More than 5 years have passed since last update.

gulp-sassで「throw er; // Unhandled 'error' event」表示された時に解決した方法

Posted at

いくつかモジュールのアップデートをしたらいきなりエラーが出るようになりましたが、
node.jsのバージョンを上げることで対応できました。

同じくgulp-autoprefixerでもエラーが出てしまいまいました

Plumber found unhandled error:
 TypeError in plugin 'gulp-autoprefixer'

こちらもnode.jsのバージョンを上げたら解消しました。

node.jsのバージョンを上げる

参考サイト:
http://chaika.hatenablog.com/entry/2016/02/13/073850

node-sass を rebuild

バージョンを上げるだけだと以下のエラーが出てしまいます。
めっちゃエラー出て焦ります。

/xxxxx/xxxxx/xxxx/node_modules/node-sass/lib/binding.js:15
      throw new Error(errors.missingBinary());
      ^

Error: Missing binding /xxxxx/xxxxx/xxxx/node_modules/node-sass/vendor/darwin-x64-48/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 6.x

Found bindings for the following environments:
  - OS X 64-bit with Node.js 5.x

参考:
https://qiita.com/pugiemonn/items/a0ec9b93addfaea3ce78

node-sassをrebuildします。
実行するのはプロジェクトのフォルダでOK。

npm rebuild node-sass
0
1
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
0
1