2

While I am trying to do gulp build or gulp watch I am getting below error -

ReferenceError: primordials is not defined
    at fs.js:47:5
    at req_ (/Users/testuser/projects/insights/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/Users/testuser/projects/insights/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/Users/testuser/projects/insights/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Module.require (node:internal/modules/cjs/loader:1013:19)
    at require (node:internal/modules/cjs/helpers:93:18)

These are the below modules and there version I've installed.

node -v
v16.2.0

npm -v
7.13.0

gulp -v
CLI version: 2.3.0
Local version: 3.9.1

I am on MacOS Catalina. Can someone please help me with this issue.

sandeep
  • 3,061
  • 11
  • 35
  • 54
  • https://stackoverflow.com/search?q=%5Bnode.js%5D+primordials – Patrick Roberts Jun 03 '21 at 06:12
  • Does this answer your question? [How to fix "ReferenceError: primordials is not defined" in Node.js](https://stackoverflow.com/questions/55921442/how-to-fix-referenceerror-primordials-is-not-defined-in-node-js) – vsync Sep 22 '22 at 21:19

1 Answers1

5

I also faced the exact same issue recently. Actually gulp 3.9 doesn't work with the latest version of node. Either upgrade gulp to v4 or downgrade node version. node v10 worked for me.

tamim_ar
  • 51
  • 3