Skip to content

gulp-sass 5 does not have a default Sass compiler; please set one yourself.

Issue Description

When updating gulp or the various dependancies, you can sometimes comes across this error:

gulp-sass 5 does not have a default Sass compiler; please set one yourself.
Both the `sass` and `node-sass` packages are permitted.
For example, in your gulpfile:

Affected Browsers

  • all

Issue Type

How to Fix the Issue

To fix it, in the gulp file, replace the line calling gulp-sass with this:

const sass                          = require('gulp-sass')(require('sass'));

You might also need to run the following command to install the requirement:

npm install sass --save-dev

Re-run the npm install after that and you should be good to go!

Back to Issues List