cards-jekyll-template
cards-jekyll-template copied to clipboard
How to fix "ReferenceError: primordials is not defined" in Node.js
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)
Try this:
sudo npm install -g n
sudo n 11.15.0
and run gulp again.