npm ERR! Failed at the chromedriver@2.46.0 install scriptの解決法

npm install 時のchromedriverのエラーの解決方法を紹介します。

[エラー内容]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.46.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@2.46.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.

[解決策]
npm install chromedriver
–chromedriver_cdnurl=https://npm.taobao.org/mirrors/chromedriver

[参考元]
下記リンクのCustom binaries urlを参照してください
https://github.com/coreui/coreui-free-vue-admin-template/issues/168

起動時のnode-sassエラーの解決法(Windows)

とても以前からあるエラーで2016年頃から確認されているものを紹介します。
他の人のプロジェクトをnpm installする際によく見られるエラーです。
node-sassはネイティブモジュール(C++)であるためビルドされた当時のNodeのバージョンに関連付けられているため、基本的にNodeの変更があれば再構築が必要となります。

[エラー内容]
Module build failed: Error: ENOENT: no such file or directory, scandir
‘[APP_DIR]\node_modules\node-sass\vendor’

[解決策]
npm rebuild node-sass

[参考元]
Windowsマシンでコンパイルするには、node-gypの前提条件が必要となります。
https://www.npmjs.com/package/node-sass-vendor
SASS_BINARY_PATHが原因の場合もあるようです。
その場合は下記コマンドでどこをみているのか確認してください。
npm config get sass_binary_path
https://github.com/sass/node-sass/issues/1812