I am following the instructions to install:
https://semantic-ui.com/introduction/getting-started.html#install-semantic-ui
When I run npm install semantic-ui --save I get an error:
> [email protected] install c:\[sanitized]\node_modules\semantic-ui
fs.js:27
const { Math, Object } = primordials;
^
ReferenceError: primordials is not defined
at fs.js:27:26
at req_ (c:\[sanitized]\node_modules\natives\index.js:143:24)
at Object.req [as require] (c:\[sanitized]\node_modules\natives\index.js:55:10)
at Object.<anonymous> (c:\[sanitized]\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:681:19)
at require (internal/modules/cjs/helpers.js:16:16)
Versions:
For me, it's been installed and working fine for a long time. Today I did my periodic yarn upgrade and got this error.
Problem solved by falling back to Node v10. Turns out Node v12 requires Gulp 4, and Semantic-UI is not compatible with Gulp 4 yet. See the closed issue for Gulp 3 is broken on Node 12.
[email protected] in devDependencies and nodejs 10.15.2 works here.
Downgraded to node 10 and it works.
When will semantic support gulp 4?
@flashspys The community fork https://github.com/fomantic/Fomantic-UI already supports gulp 4 since v 2.7.0
Encountering this error with node version 12.13.0
Hi, installation freeze console in Windows 10.
npm install -g gulp
npm install semantic-ui --save
Freeze :
Installing to semantic/
Copying UI definitions
Copying UI themes
Copying gulp tasks
Adding theme files
Creating gulpfile.js
Creating site theme folder C:\SEMANTIC\semantic\src\site\
[06:03:06] Starting 'create theme.config'...
Adjusting @siteFolder to: site/
Creating src/theme.config (LESS config) C:\SEMANTIC\semantic\src\theme.config`
I am interset to use semantic w. gulp but ... it freeze console.
Escape + gulp build :
PS C:\SEMANTIC> cd semantic/
PS C:\SEMANTIC\semantic> gulp build
[06:23:48] Using gulpfile C:\SEMANTIC\semantic\gulpfile.js
[06:23:48] Starting 'build'...
Building Semantic
Cannot find semantic.json. Run "gulp install" to set-up Semantic
PS C:\SEMANTIC\semantic> gulp install
[06:24:12] Using gulpfile C:\SEMANTIC\semantic\gulpfile.js
[06:24:12] Task 'install' is not in your gulpfile
[06:24:12] Please check the documentation for proper gulpfile formatting
PS C:\SEMANTIC\semantic>
Thanks for your responses,
cordially,
raf
Any news ?
I've encountered this bug and I don't want to downgrade node
Then the community fork seems to be your only option
https://github.com/Semantic-Org/Semantic-UI/issues/6818#issuecomment-498204168
I moved to Fomantic and it installs without an issue. So far my site is running fine. It is obviously a solvable issue, I would have stayed with Semantic if it were fixed, but downgrading node is not a great option.
I moved to Fomantic too and everything works now. Thanks.
For anyone who doesn't want to migrate, you can add
"resolutions": {
"graceful-fs": "4.2.2"
},
to package.json if you use yarn.
Most helpful comment
@flashspys The community fork https://github.com/fomantic/Fomantic-UI already supports gulp 4 since v 2.7.0