npm run cannot find module 'sass' after repeated reinstall attempts
Since 4.0.0 laravel-mix
switched to using sass
instead of node-sass
.
Two ways to solve this issue:
Install
sass
npm package:npm -g i sass
Configure
mix
to usenode-sass
instead (webpack.mix.js
):mix.sass('resources/assets/sass/app.scss', 'public/css', { implementation: require('node-sass')});
ReactJS uses node-sass
, run the below command.
npm install node-sass --save
I had the same issue some times back but I did this and it worked
npm cache clear --forcenpm install sass
This should work for you I hope