Search code examples
node.jsnpmgulpsemantic-ui

ReferenceError: primordials is not defined error when installing Semantic UI


I know that this question had been asked a lots of times (for instance - here), but either solutions didn't work or didn't fit my scenario. The solution, offered in the link above, was:

Solution: Either upgrade to gulp 4 or downgrade to an earlier node.

So, here's what I have:

• Node: 12.18.1 (node -v)

• Gulp: CLI 2.3.0, Local version 4.0.2 (gulp -v)

I have created brand new react app:

npx create-react-app --template typescript react-app

Then I go to app folder (react-app) and execute the following command as on Semantic UI site:

npm install semantic-ui --save

However, I get the same error as in the question above. Here's the full output of this command: enter image description here


Solution

  • Try going back to Node v10. The thing is that Node v12 has a feature that is not compatible with Semantic-UI (Gulp 4.0.2), and that's why you get the error.