Я новичок в изучении современного рабочего процесса webdev.Я получаю это сообщение об ошибке в моей консоли.TypeError: dest.on is not a function
Я знаю, здесь есть связанные вопросы и ответы.Но я их не понимаю.Потому что я не знаю, с чем связано "dest.on" и что оно делает.Это код на данный момент:
var gulp = require("gulp");
var sass = require("gulp-sass");
var sourcemaps = require("gulp-sourcemaps");
var autoprefixer = require("auto-prefixer");
var imagemin = require("gulp-imagemin");
var browserSync = require("browser-sync").create();
gulp.task("css", function() {
return gulp
.src("src/sass/**/*.scss")
.pipe(sourcemaps.init())
.pipe(sass({ outputStyle: "compressed" }).on("error", sass.logError))
.pipe(
autoprefixer({
browsers: ["last 2 versions"]
})
)
.pipe(sourcemaps.write("./maps"))
.pipe(gulp.dest("dist/css"));
});
Может кто-нибудь объяснить, что означает сообщение об ошибке и как я могу решить эту конкретную проблему? Извините за избыточность, но я не нашел решенияв существующих ответах.
Редактировать :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Может быть, это поможет добавить package.json
{
"name": "sitepointresponsivewebsite",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"auto-prefixer": "^0.4.2",
"browser-sync": "^2.26.3",
"gulp": "^4.0.0",
"gulp-imagemin": "^5.0.3",
"gulp-sass": "^4.0.2",
"gulp-sourcemaps": "^2.6.5"
}
}
Это полное сообщение об ошибке терминала
`
Beratungs-MacBook-Pro-2:sitepointResponsiveWebsite Beratung1$ gulp css
[14:04:02] Using gulpfile ~/Desktop/sitepointResponsiveWebsite/gulpfile.js
[14:04:02] Starting 'css'...
[14:04:02] 'css' errored after 12 ms
[14:04:02] TypeError: dest.on is not a function
at DestroyableTransform.Readable.pipe (/Users/Beratung1/Desktop/sitepointResponsiveWebsite/node_modules/readable-stream/lib/_stream_readable.js:564:8)
at /Users/Beratung1/Desktop/sitepointResponsiveWebsite/gulpfile.js:13:6
at taskWrapper (/Users/Beratung1/Desktop/sitepointResponsiveWebsite/node_modules/undertaker/lib/set-task.js:13:15)
at bound (domain.js:396:14)
at runBound (domain.js:409:12)
at asyncRunner (/Users/Beratung1/Desktop/sitepointResponsiveWebsite/node_modules/async-done/index.js:55:18)
at process._tickCallback (internal/process/next_tick.js:61:11)