cards-jekyll-template icon indicating copy to clipboard operation
cards-jekyll-template copied to clipboard

How to fix "ReferenceError: primordials is not defined" in Node.js

Open aparrot89 opened this issue 2 years ago • 1 comments

I have installed Node.js modules by 'npm install', and then I tried to do npm install -g gulp gulp-cli.

When I run gulp I get that :

ReferenceError: primordials is not defined
    at fs.js:47:5
    at req_ (/Users/aparrot/git/cards-jekyll-template/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/Users/aparrot/git/cards-jekyll-template/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/Users/aparrot/git/cards-jekyll-template/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (node:internal/modules/cjs/loader:1099:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)

aparrot89 avatar Apr 19 '22 17:04 aparrot89

Try this:

sudo npm install -g n
sudo n 11.15.0

and run gulp again.

rykersun avatar Jul 01 '22 03:07 rykersun