Hello Guys, How are you all? Hope You all Are Fine. Today in nodejs. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
- How gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the
sass
andnode-sass
packages are permitted Error Occurs ? - How To Solve gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the
sass
andnode-sass
packages are permitted Error ? - Solution 1
- Solution 2
- Summery
How gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the sass
and node-sass
packages are permitted Error Occurs ?
I am just want to use gulp-sass and sass. But I am getting the following error.
Error in plugin "gulp-sass"
Message:
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:
Here is my code.
var sass = require('gulp-sass')(require('sass'));
How To Solve gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the sass
and node-sass
packages are permitted Error ?
- How To Solve gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the
sass
andnode-sass
packages are permitted Error ?To Solve gulp-sass 5 does not have a default Sass compiler; please set one yourself. Both the
sass
andnode-sass
packages are permitted Try this to import instead of requiring. import gulpSass from “gulp-sass”; import nodeSass from “node-sass”; const sass = gulpSass(nodeSass);
Solution 1
Try this to import instead of 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 );
Summery
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also Read