Tag Archives: gulp-sass

[Solved] Gulp-sass Install Error: error: cannot find module ‘sass‘

The following errors are reported:

View the official gulp-sass Download document:

The following solutions are given:

To use gulp-sass, you have to download node-sass or dart sass, and then download gulp-sass;

Download node-sass using the following command:

npm   install   node-sass

Use the following command to download the Gup sass protest without error

npm install sass gulp-sass --save-dev

To use gulp-sass, you must install both gulp-sass itself and a Sass compiler. gulp-sasssupports both Dart Sass and Node Sass, but Node Sass is deprecated. We recommend that you use Dart Sass for new projects, and migrate Node Sass projects to Dart Sass when possible.
Whichever compiler you choose, it’s best to install these as dev dependencies:
Then the sass module is introduced in gulpfile.js at
var sass = require(‘gulp-sass’)(require(‘sass’);