简体   繁体   中英

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)

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 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM