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)
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.
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.
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.
gulp-sass supports both Dart Sass and Node Sass, although Node Sass is deprecated.
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.
Did you check this question?
May be possible solution is:
rm -rf node_modules/ npm install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With