Gulp not working: error [ERR_REQUIRE_ESM]: require() of ES Module

Created on 21 May 2024, 6 months ago

Problem/Motivation

error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\Administrator\AppData\Roaming\nvm\v18.20.2\node_modules\gulp-autoprefixer\index.js from C:\Users\Administrator\Downloads\Documents\drupal\web\themes\contrib\bones_theme\starterkits\bones_subtheme\gulpfile.js not supported.
Instead change the require of index.js in C:\Users\Administrator\Downloads\Documents\drupal\web\themes\contrib\bones_theme\starterkits\bones_subtheme\gulpfile.js to a dynamic import() which is available in all CommonJS modules.
at Object. (C:\Users\Administrator\Downloads\Documents\drupal\web\themes\contrib\bones_theme\starterkits\bones_subtheme\gulpfile.js:11:20) {
code: 'ERR_REQUIRE_ESM'

Steps to reproduce

$ npm --version
node10.5.0

$ node --version
v18.20.2

$ gulp --version
CLI version: 3.0.0
Local version: 5.0.0

Open terminal
cd to the theme directory
Run "npm link [package1] [package2] [etc...]" to install the necessary packages:
npm link gulp gulp-sass gulp-sourcemaps gulp-autoprefixer node-sass-globbing gulp-plumber gulp-cssmin browser-sync breakpoint-sass compass-mixins

gulp error

Proposed resolution

Remaining tasks

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024