Semantic-UI icon indicating copy to clipboard operation
Semantic-UI copied to clipboard

[Install] Error installing using gulp

Open the-rockkk opened this issue 5 years ago • 14 comments

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:

  • Node: v12.3.1
  • Npm: v6.9.0
  • Gulp: 4.0.2

the-rockkk avatar May 28 '19 20:05 the-rockkk

For me, it's been installed and working fine for a long time. Today I did my periodic yarn upgrade and got this error.

dmulter avatar May 29 '19 14:05 dmulter

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.

dmulter avatar Jun 01 '19 20:06 dmulter

[email protected] in devDependencies and nodejs 10.15.2 works here.

zakpatterson avatar Jun 02 '19 19:06 zakpatterson

Downgraded to node 10 and it works.

the-rockkk avatar Jun 02 '19 21:06 the-rockkk

When will semantic support gulp 4?

flashspys avatar Jun 03 '19 10:06 flashspys

@flashspys The community fork https://github.com/fomantic/Fomantic-UI already supports gulp 4 since v 2.7.0

lubber-de avatar Jun 03 '19 10:06 lubber-de

Encountering this error with node version 12.13.0

thenormalsquid avatar Oct 28 '19 10:10 thenormalsquid

Hi, installation freeze console in Windows 10. npm install -g gulp npm install semantic-ui --save

  • Choose options ...

Freeze :

`Installing

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

Raf-sns avatar Dec 07 '19 05:12 Raf-sns

Any news ? I've encountered this bug and I don't want to downgrade node

DanteMarshal avatar Feb 13 '20 11:02 DanteMarshal

Then the community fork seems to be your only option https://github.com/Semantic-Org/Semantic-UI/issues/6818#issuecomment-498204168

lubber-de avatar Feb 13 '20 11:02 lubber-de

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.

the-rockkk avatar Feb 13 '20 13:02 the-rockkk

I moved to Fomantic too and everything works now. Thanks.

DanteMarshal avatar Feb 14 '20 04:02 DanteMarshal

For anyone who doesn't want to migrate, you can add

  "resolutions": {
    "graceful-fs": "4.2.2"
  },

to package.json if you use yarn.

kelvinau avatar Mar 08 '20 23:03 kelvinau

Found this way to make it work without downgrading node and using npm.

primordials fix

JithinAji avatar Jun 27 '21 11:06 JithinAji