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.1k stars 4.95k forks source link

[Install] Error installing using gulp #6818

Open the-rockkk opened 5 years ago

the-rockkk commented 5 years ago

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:

> semantic-ui@2.4.2 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:

dmulter commented 5 years ago

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 commented 5 years ago

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.

zakpatterson commented 5 years ago

gulp@3.9.1 in devDependencies and nodejs 10.15.2 works here.

the-rockkk commented 5 years ago

Downgraded to node 10 and it works.

flashspys commented 5 years ago

When will semantic support gulp 4?

lubber-de commented 5 years ago

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

thenormalsquid commented 4 years ago

Encountering this error with node version 12.13.0

Raf-sns commented 4 years ago

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

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

DanteMarshal commented 4 years ago

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

lubber-de commented 4 years ago

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

the-rockkk commented 4 years ago

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.

DanteMarshal commented 4 years ago

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

kelvinau commented 4 years ago

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

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

to package.json if you use yarn.

JithinAji commented 3 years ago

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

primordials fix