Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module build failed: Error: Cannot find module 'node-sass'

Module build failed: Error: Cannot find module 'node-sass'

Also run the commands,

sudo npm install node-sass --save

sudo npm rebuild node-sass --force

Still showing the same error. Anyone pls help.

like image 263
Vishnu Nair Avatar asked Sep 07 '18 04:09

Vishnu Nair


3 Answers

There are two things you can do to fixed this issue.

1) npm rebuild node-sass --force 

2) npm install node-sass

This both command will fixed your node-sass issue.

like image 116
Sachin Shah Avatar answered Oct 03 '22 19:10

Sachin Shah


This is a common issue

Step 1 : Try removing the node_modules directory

Step 2: Install with the command

npm i

like image 27
Sajeetharan Avatar answered Oct 03 '22 19:10

Sajeetharan


I got the same error and this command fix my issue. sudo npm install --save-dev --unsafe-perm node-sass

like image 6
Betsegaw Avatar answered Oct 03 '22 20:10

Betsegaw