Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.06k stars 4.95k forks source link

Can't install Semantic UI, NPM errors. #7115

Open futuremotiondev opened 1 year ago

futuremotiondev commented 1 year ago

Steps to Reproduce

npm install semantic-ui --save
cd semantic/
gulp build

Expected Result

Semantic UI should install without issue.

Actual Result

Many errors.

PS D:\Dev\Web\Projects\Semantic UI> npm install semantic-ui --save
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm ERR! code 1
npm ERR! path D:\Dev\Web\Projects\Semantic UI\node_modules\semantic-ui
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c gulp install
npm ERR! Error [ERR_REQUIRE_ESM]: require() of ES Module D:\Dev\Web\Projects\Semantic UI\node_modules\del\index.js from D:\Dev\Web\Projects\Semantic UI\node_modules\semantic-ui\tasks\clean.js not supported.
npm ERR! Instead change the require of index.js in D:\Dev\Web\Projects\Semantic UI\node_modules\semantic-ui\tasks\clean.js to a dynamic import() which is available in all CommonJS modules.
npm ERR!     at Object.<anonymous> (D:\Dev\Web\Projects\Semantic UI\node_modules\semantic-ui\tasks\clean.js:8:12)
npm ERR!     at Object.<anonymous> (D:\Dev\Web\Projects\Semantic UI\node_modules\semantic-ui\gulpfile.js:21:18) {
npm ERR!   code: 'ERR_REQUIRE_ESM'
npm ERR! }

npm ERR! A complete log of this run can be found in: C:\Users\[username]\AppData\Local\npm-cache\_logs\2023-05-15T12_44_29_878Z-debug-0.log

I've tried with node latest, LTS, and even 16.20.0.

Version

Semantic UI 2.4 Win10 Pro x64 NPM 20.1.0

Log

The full verbose log is attached.

Screenshot

pwsh_jZ3vYYLcCY

2023-05-15T12_51_22_380Z-debug-0.log

GammaGames commented 1 year ago

Try the community fork with npm install fomantic-ui --save

vyomraj commented 7 months ago

has this been resolved?

20RitikSingh commented 7 months ago

reason: require() of ES Module _D:\Dev\Web\Projects\Semantic UI\nodemodules\del\index.js from _D:\Dev\Web\Projects\Semantic UI\nodemodules\semantic-ui\tasks\clean.js not supported.

solution:

// Before
const del = require('del');

// After
import('del').then((del) => {
  // Now you can use the 'del' module here
});

change the require of index.js in D:\Dev\Web\Projects\Semantic UI\node_modules\semantic-ui\tasks\clean.js to a dynamic import() which is available in all CommonJS modules.

sibeduli commented 6 months ago

Try the community fork with npm install fomantic-ui --save

does that mean this project is abandoned or is it currently fixing a major issue? sorry I'm new to this UI stuff suggesting a fork rather than previous release, raises this concern

connorpwilliams commented 6 months ago

Semanti-UI appears to have been abandoned but Fomanti-UI is like an expansion/continuation of Semantic-UI