Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Cannot find module 'gulp-sass'

Tags:

npm

sass

gulp

When I compile with gulp, I got an error like below. How can I fix it?

module.js:339 throw err; ^ Error: Cannot find module 'gulp-sass'     at Function.Module._resolveFilename (module.js:337:15)     at Function.Module._load (module.js:287:25)     at Module.require (module.js:366:17)     at require (module.js:385:17)     at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/flyscoot.com/gulpfile.js:2:12)     at Module._compile (module.js:435:26)     at Object.Module._extensions..js (module.js:442:10)     at Module.load (module.js:356:32)     at Function.Module._load (module.js:311:12)     at Module.require (module.js:366:17) 
like image 390
Htet Win Avatar asked Oct 24 '15 04:10

Htet Win


People also ask

Can not find module gulp-sass?

If you don't see the gulp-sass package in your node_modules folder, or are still having issues, you can try reinstalling the package. First, open your package. json and package-lock. json files and remove any references to gulp-sass and node-sass that you see.

Can not find module sass?

To Solve Cannot find module 'sass' in reactjs Error You just need to globally install sass module with this plugin. First of all you need to forcefully clear your cache with this plugin: npm cache clear –force Now, You have to install sass module with this command: npm install sass Now, your error must be solved.

How do I check my gulp-sass version?

log(sass.info); It's going to be the . info() from node-sass who get's called in the end, giving you both it's version and libsass's version.

Does gulp-sass use node sass?

gulp-sass supports both Dart Sass and Node Sass, although Node Sass is deprecated.


2 Answers

Just do npm update and then npm install gulp-sass --save-dev in your root folder, and then when you run you shouldn't have any issues.

like image 99
Dhruv Ghulati Avatar answered Sep 22 '22 07:09

Dhruv Ghulati


Did you check this question?

May be possible solution is:

rm -rf node_modules/ npm install 
like image 40
vtokmak Avatar answered Sep 25 '22 07:09

vtokmak