// この記事は、 note に投稿した記事の再掲です。
Node.jsをバージョンアップ後、gulpを実行したら以下のエラー。
Error: Missing binding /my/hoge/dir/node_modules/node-sass/vendor/darwin-x64-59/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 9.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 8.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
at module.exports (/my/hoge/dir/node_modules/node-sass/lib/binding.js:15:13)
at Object.<anonymous> (/my/hoge/dir/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/my/hoge/dir/node_modules/gulp-sass/index.js:187:21)
Sassがなんやかんやしてるっぽい?
エラーを解消するには
$ npm rebuild node-sass
rebuildしたら動いた