Install help? ERR_REQUIRE_ESM error

Created on 11 June 2024, 5 months ago
Updated 9 August 2024, 3 months ago

Problem/Motivation

Hi, I am new to this system, NPM, Gulp etc. I was able to get my environment up to spec, I was able to get my sub theme created and followed the readme instruction. When I run 'npm run build' I get this error about using import() instead of 'require'

Error [ERR_REQUIRE_ESM]: require() of ES Module D:\wwwroot\pss_2024\web\themes\custom\ui_suite_uswds_nccpss\node_modules\del\index.js from D:\wwwroot\pss_2024\web\themes\custom\ui_suite_uswds_nccpss\gulpfile.js not supported.
Instead change the require of index.js in D:\wwwroot\pss_2024\web\themes\custom\ui_suite_uswds_nccpss\gulpfile.js to a dynamic import() which is available in all CommonJS modules.
at Object. (D:\wwwroot\pss_2024\web\themes\custom\ui_suite_uswds_nccpss\gulpfile.js:9:13) {
code: 'ERR_REQUIRE_ESM'

Is there a way around this so I can use the script as it was written? I know this is a bit outside of the theme itself.

node - v20.14.0
npm - 10.7.0

gulp
CLI version: 3.0.0
Local version: 5.0.0

πŸ’¬ Support request
Status

Closed: outdated

Version

3.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States goose2000

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024