Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error running npm command on Windows: graceful-fs

I have a ReactJS project and I was trying to use some of the PrimeReact components. At some point, I faced an error (can't remember exactly which one) and I tried to run an older version of NPM in a copy of my main directory.

Now, I get this error every time, even when I run npm command.

I've already tried to delete my node_modules folder, delete my project and clone it back from GitHub and also to reinstall NodeJS several times. I don't know what to do!

I have Windows 10 and I'm using NodeJS v12.16.0.

Thanks to anyone that offers some help

Update: I have never installed gulp. I suppose that maybe some dependency is using it but, because I can't run any npm command, I can't remove them D:

The error:

C:\Users\Carlos>npm
evalmachine.<anonymous>:35
} = primordials;
    ^

ReferenceError: primordials is not defined
    at evalmachine.<anonymous>:35:5
    at Object.<anonymous> (C:\Users\Carlos\AppData\Roaming\npm\node_modules\npm\node_modules\npm-registry-client\node_modules\graceful-fs\fs.js:12:1)
    at Module._compile (internal/modules/cjs/loader.js:1157:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Module.require (internal/modules/cjs/loader.js:1043:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\Users\Carlos\AppData\Roaming\npm\node_modules\npm\node_modules\npm-registry-client\node_modules\graceful-fs\graceful-fs.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:1157:30)
like image 482
Leandro Garcia Luzzi Avatar asked Mar 08 '26 16:03

Leandro Garcia Luzzi


1 Answers

It might be an error related with gulp and node v12 conflict. If you have the gulp installed globally in your environment and you can uninstall without problems, you can try it. To help with commands, check if you have the gulp installed, typing this in your command line interface:

gulp -v

Uninstall your version:

npm uninstall -g gulp 
like image 160
Evandro Nogueira Exposto Avatar answered Mar 11 '26 07:03

Evandro Nogueira Exposto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!