How To Fix “gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the `sass` and `node-sass` packages are permitted.”?
Are you having problems with the issue “gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the `sass` and `node-sass` packages are permitted.“? How to fix it? In today’s article, I will provide solutions for you to solve the issues. Please follow the below steps to get the problem resolved now
How did “gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the `sass` and `node-sass` packages are permitted.” occur?
gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the `sass` and `node-sass` packages are permitted.
When you work with Nodejs, you may get the issue gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the `sass` and `node-sass` packages are permitted.. Don’t worry, we are here to provide you solutions in order to resolve your problem.
How to fix “gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the `sass` and `node-sass` packages are permitted.”?
Solve gulp–sass 5 doesn’t have a default Sass compiler; please create one. You can import both the sass
or node-sass
packages. import gulpSass (node-sass); import nodeSass (node-sass); const sass = “gulpSass(nodeSass);
Solution 1
This will allow you to import rather than requiring.
import gulpSass from "gulp-sass";
import nodeSass from "node-sass";
const sass = gulpSass(nodeSass);
Solution 2
import dartSass from 'sass';
import gulpSass from 'gulp-sass';
const sass = gulpSass( dartSass );
Final words
The above are useful solutions that can help you fix “gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the `sass` and `node-sass` packages are permitted.” problem, if you can’t solve it well. Please leave a message.