liorgrossman / darkness

Dark Themes for Popular Websites
https://darkness.app
GNU General Public License v3.0
513 stars 754 forks source link

How to fix "ReferenceError: primordials is not defined" #229

Open joshjavier opened 3 years ago

joshjavier commented 3 years ago

I'm trying to install Darkness Developer Edition. Every step worked fine except for the last one

  1. Run npm install from the same directory as package.json to install dependencies and compile all SCSS to CSS

where I encountered the following error

❯ npm install

> Darkness@1.0.0 install /home/joshjavier/OpenSourceContributions/darkness
> gulp install

fs.js:41
} = primordials;
    ^

ReferenceError: primordials is not defined
    at fs.js:41:5
    at req_ (/home/joshjavier/OpenSourceContributions/darkness/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/home/joshjavier/OpenSourceContributions/darkness/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/home/joshjavier/OpenSourceContributions/darkness/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:1085:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:791:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:88:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Darkness@1.0.0 install: `gulp install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the Darkness@1.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Checking the version of some packages gave me the following:

What's the recommended way to fix this?

theme1256 commented 3 years ago

Currently it is not possible to compile Darkness with node version 12+.

vesper8 commented 3 years ago

To be clear, you have to install node 11 to compile darkness

Simply nvm install 11