После того как я добавил в html небольшую форму, появилась эта ошибка.
gulp
/home/coda/Documents/gulp-test/gulpfile.js:33
fileinclude = require("gulp-file-include"),
^
SyntaxError: Identifier 'fileinclude' has already been declared
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at requireOrImport (/usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/shared/require-or-import.js:19:11)
at execute (/usr/local/lib/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js:37:3)
вот сам код
const fileinclude = require('gulp-file-include');
let project_folder = "dist";
let source_folder = "#src"
Ankhena, без этой строки выпадает такая ошибка.
gulp
[13:45:55] Using gulpfile ~/Documents/gulp-test/gulpfile.js
[13:45:55] Starting 'default'...
[13:45:55] Starting 'watchFiles'...
[13:45:55] Starting 'browserSync'...
[13:45:55] Starting 'clean'...
[13:45:55] Finished 'clean' after 45 ms
[13:45:55] Starting 'css'...
[13:45:55] Starting 'html'...
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:
var sass = require('gulp-sass')(require('sass'));
[13:45:55] The following tasks did not complete: default, , watchFiles, browserSync, , css, html
[13:45:55] Did you forget to signal async completion?
zingerrrr, ок, и где у вас эта var sass = require('gulp-sass')(require('sass')); строка?
Да ведь вам терминал в ошибке всё пишет.
Написали, что для 5го sass нужно по-другому писать require, вы вместо этого добавляете лишнюю строку про fileinclude? Где логика?