gulp.task('useref', function () {
return gulp.src('app/embeds/footer.php')
.pipe(useref())
.pipe(gulp.dest('dist'))
});
I keep getting this error:
TypeError: Cannot read property 'replace' of undefined
at module.exports (/my-project/repo/node_modules/useref/lib/getBlocks.js:31:19)
at module.exports (/my-project/repo/node_modules/useref/index.js:8:16)
at Gulp.<anonymous> (/my-project/repo/gulpfile.js:108:15)
at module.exports (/my-project/repo/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/my-project/repo/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/my-project/repo/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/my-project/repo/node_modules/orchestrator/index.js:134:8)
at /usr/local/lib/node_modules/gulp-cli/lib/versioned/^3.7.0/index.js:46:20
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
I have tried everything and despite an irksome feeling that it is my incompetence I am at a loss.
I have the folder structure:
footer.php looks like this:
My gulp task looks like this:
I keep getting this error: