Not working was referring to incorrect syntax in index.js what's wrong?

Can't understand what is happening. set stylelint(https://www.npmjs.com/package/gulp-stylelint). Try to run but nothing happens
D:\untitled\node_modules\stylelint\lib\index.js:33
);
^
SyntaxError: Unexpected token )
 at Object.exports.runInThisContext (vm.js:78:16)
 at Module._compile (module.js:543:28)
 at Object.Module._extensions..js (module.js:580:10)
 at Module.load (module.js:488:32)
 at tryModuleLoad (module.js:447:12)
 at Function.Module._load (module.js:439:3)
 at Module.require (module.js:498:17)
 at require (internal/module.js:20:19)
 at Object.<anonymous> (D:\untitled\node_modules\gulp-stylelint\src\index.js:5:28)
 at Module._compile (module.js:571:32)


The file where the error refers
'use strict';

const checkAgainstRule = require('./utils/checkAgainstRule');
const createPlugin = require('./createPlugin');
const createStylelint = require('./createStylelint');
const formatters = require('./formatters');
const postcssPlugin = require('./postcssPlugin');
const report = require('./utils/report');
const requireRule = require('./requireRule');
const ruleMessages = require('./utils/ruleMessages');
const rules = require('./rules');
const standalone = require('./standalone');
const validateOptions = require('./utils/validateOptions');

/**
 * TODO TYPES change any to appropriated options
 * @type {import('postcss').Plugin<any> & Partial<import('stylelint').StylelintPublicAPI>}
*/
const api = postcssPlugin;

const requiredRules = rules.reduce(
/**
 * @param {{[k: string]: any}} acc
 * @param {string} cur
 * @return {{[k: string]: any}}
*/
 (acc, cur) => {
 acc[cur] = requireRule(cur);

 return acc;
},
{},
); ---- here error

api.utils = {
report
ruleMessages,
validateOptions,
checkAgainstRule,
};

api.lint = standalone;
api.rules = requiredRules;
api.formatters = formatters;
api.createPlugin = createPlugin;
api.createLinter = createStylelint;

module.exports = api;


He Gulp

let gulp = require('gulp');
const sass = require('gulp-sass');
const less = require('gulp-less');
const stylus = require('gulp-stylus');
const sourcemaps = require('gulp-sourcemaps');
const autoprefixer = require('autoprefixer');
const browserSync = require('browser-sync').create();
const postcss = require('gulp-postcss');
//const cssnano = require('cssnano');
//const short = require('postcss-short');
const beautify = require('gulp-beautify');
//const sassLint = require('gulp-sass-lint');
const gulpStylelint = require('gulp-stylelint');


//sass
gulp.task('itsass', function() {
 return gulp.src('./scss/*.scss')
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(postcss([
autoprefixer(),
//cssnano(),
//short(),
]))
.pipe(sourcemaps.write())
.pipe(gulp.dest('./css/'))
.pipe(browserSync.reload({
 stream: true
}));
});

//less
gulp.task('itless', function() {
 return gulp.src('./less/*.less')
.pipe(sourcemaps.init())
.pipe(less())
.pipe(postcss([autoprefixer()]))
.pipe(sourcemaps.write())
.pipe(gulp.dest('./css/'))
.pipe(browserSync.reload({
 stream: true
}));
});

//stylus
gulp.task('itstylus', function() {
 return gulp.src('./stylus/*.styl')
.pipe(sourcemaps.init())
.pipe(stylus())
.pipe(postcss([autoprefixer()]))
.pipe(sourcemaps.write())
.pipe(gulp.dest('./css/'))
.pipe(browserSync.reload({
 stream: true
}));
});
//server
gulp.task('serve', function() {
browserSync.init({
 server: {
 basedir: './',
},
 port: 3000,
});
});

browRe function() {
 return browserSync.reload();

}

gulp.task('beautify', function() {
 return gulp
.src('./css/*.css')
 .pipe(beautify.css({indent_size: 2}))
.pipe(gulp.dest('./css/'));
});

//gulp.task('sass', function() {
// return gulp.src('./scss/*.scss')
// .pipe(sassLint({
// options: {
// formatter: 'stylish',
// 'merge-default-rules': false
// },
// files: {ignore: '**/*.scss'},
// rules: {
// 'no-ids': 1,
// 'no-mergeable-selectors': 0
// },
// configFile: 'config/other/.sass-lint.yml
// }))
// .pipe(sassLint.the format())
// .pipe(sassLint.failOnError())
// .pipe(gulp.dest('./'));
//});

//watch
gulp.task('watche', function() {
 gulp.watch('./scss/*.scss', gulp.series('itsass'));
 gulp.watch('./less/*.less', gulp.series('itless'));
 gulp.watch('./stylus/*.styl', gulp.series('itstylus'));
 gulp.watch('./*.html', browRe);
 gulp.watch('.js/*.js', browRe);
 gulp.watch('.php/*.php', browRe);
});

gulp.task('lint-css', function () {
 return gulp
.src('src/**/*.css')
.pipe(gulpStylelint({
 reporters: [{
 formatter: 'string',
 console: true
}]
}));
});
//build
gulp.task('default', gulp.parallel('serve', 'beautify', 'lint-css', 'watche'));


index.js custom changes are not subjected to
error crashes after installation.
In the same way .stylelintrc.json

{
 "extends":["stylelint-config-standard", "stylelint-config-recess-order"],
 "rules": {
 "indentation": 2,
 "string-quotes": "single",
 "declaration-colon-space-before": "never",
 "declaration-colon-space-after": "never",
 "rule-empty-line-before": "never",
 "media-feature-range-operator-space-before": "never",
 "media-feature-range-operator-space-after": "never",
 "media-feature-colon-space-before": "never",
 "media-feature-colon-space-after": "never"
}

}
April 3rd 20 at 18:47
1 answer
April 3rd 20 at 18:49
Solution
Check the version of NodeJS installed on your computer (node-v).
Most likely, this version is outdated and you want to install the newer. Now LTS version -- 12.

Find more questions by tags JavaScriptNode.jsGulp.js