Answer the question
In order to leave comments, you need to log in
Why does gulp-pug build fail?
I use pug for layout. When building the project, I get an error:
[00:25:06] Plumber found unhandled error:
RangeError in plugin "gulp-pug"
Message:
D:\Work\Web\bhproby\src\pug\mixins.pug:21
19|
20| mixin bransItem(brandsCount)
> 21| li.brands__item
22| img(src=`images/pic--brand-${brandsCount}.jpg`).brands__thumbnail
23|
Invalid string length
function fPug() {
return src('src/pug/pages/*.pug')
.pipe(plumber())
.pipe(pug({
pretty: true
}))
.pipe(dest('build'))
.pipe(browserSync.stream());
}
"devDependencies": {
"@htmlacademy/editorconfig-cli": "1.x",
"browser-sync": "^2.26.14",
"del": "^6.0.0",
"eslint": "^7.24.0",
"eslint-config-htmlacademy": "^3.0.0",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^7.0.1",
"gulp-concat": "^2.6.1",
"gulp-imagemin": "^7.1.0",
"gulp-newer": "^1.4.0",
"gulp-plumber": "^1.2.1",
"gulp-pug": "^4.0.1",
"gulp-sass": "^4.1.0",
"gulp-sourcemaps": "^3.0.0",
"gulp-svg-sprite": "^1.5.0",
"gulp-ttf2woff": "^1.1.1",
"gulp-ttf2woff2": "^4.0.1",
"gulp-uglify-es": "^2.0.0",
"stylelint": "^13.12.0",
"stylelint-config-htmlacademy": "^0.1.4"
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question