C
C
campot2021-07-01 21:32:05
Sass
campot, 2021-07-01 21:32:05

How to fix error when running GULP-a Error in plugin “gulp-sass”?

The first time I run Galp, the following error occurs in the terminal:
60de099178bdd812747023.jpeg

The folder hierarchy is correct. First I run the npm i command, after that gulp
the error says that there is no built-in sass compiler in version 5 of gulp. separately installed it with the command npm install sass gulp-sass --save-dev

And still this error occurs. Help please, how to treat this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
nik_devil_jr, 2021-09-30
@nik_devil_jr

Try declaring a variable like this, it worked for me
let sass = require('gulp-sass')(require('sass'));

A
AlexZD7887, 2021-10-06
@AlexZD7887

const gulp = require('gulp'),
browserSync = require('browser-sync').create(),
pug = require('gulp-pug');
const sass = require('gulp-sass')(require('sass'));
But before that I had to reinstall gulp to version 4-1-2

V
Vitaly Sova, 2022-02-21
@sova2011

Thanks everyone!
Adding const sass = require('gulp-sass')(require('sass')); helped me too .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question