コレグレーデギネード

WindowsとかUbuntuとかRubyとかRailsとか

rails webpaker:install error node_modules/node-sass: Command failed.

Gemfile内のwebpackerのバージョンを変更
Gemfile

- gem 'webpacker',  '~> 4.0'
+ gem 'webpacker',  '~> 5.0'
$ bundle install

yarn.lockの削除

package.json内のwebpackerのバージョンを変更
package.json

- "@rails/webpacker": "4.3.0"
+ "@rails/webpacker": "5.4.3"
$ yarn install
$ yarn add node-sass

参考:error /node_modules/node-sass: Command failedの解決策