Semantic-UI
Semantic-UI copied to clipboard
v2.5.0: Install reporting ERR_REQUIRE_ESM regarding del package and clean gulp script
Steps
Install the [email protected] package via npm or yarn.
Actual Result
error /Users/markcrawshaw/Code/metamap/node_modules/semantic-ui: Command failed.
Exit code: 1
Command: gulp install
Arguments:
Directory: /Users/markcrawshaw/Code/metamap/node_modules/semantic-ui
Output:
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/markcrawshaw/Code/metamap/node_modules/del/index.js from /Users/markcrawshaw/Code/metamap/node_modules/semantic-ui/tasks/clean.js not supported.
Instead change the require of index.js in /Users/markcrawshaw/Code/metamap/node_modules/semantic-ui/tasks/clean.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/Users/markcrawshaw/Code/metamap/node_modules/semantic-ui/tasks/clean.js:8:12)
at Object.<anonymous> (/Users/markcrawshaw/Code/metamap/node_modules/semantic-ui/gulpfile.js:21:18)
at async Promise.all (index 0) {
code: 'ERR_REQUIRE_ESM'
}
Version
2.5.0
Recommendation
For users, you can force a resolution in your package.json to [email protected]. For maintainers, I suggest specifying 6.1 in the package.json (over *) or completing an overhaul of the gulp file to ESM (https://gulpjs.com/docs/en/getting-started/javascript-and-gulpfiles/#transpilation).
Issue is also referenced on overflow: https://stackoverflow.com/questions/74133651/semantic-ui-install-fail-npm
I had the same problem, thanks @mcrawshaw.
To get past this, I did:
git clone [email protected]:Semantic-Org/Semantic-UI.git
cd Semantic-UI
npm i --save-dev [email protected]
gulp install
I'm having the same issue. Why do we need to do a gulp install? I'm just looking for the lib here.
Not sure about @sepastian setup. Generally, you are just looking to force the resolution of the del package (general steps are different for yarn vs npm - check online).
Same issue here.
Same issue here.
I am still getting this.