0

I got this problem for a while can't find any solution , please give me some explain.

C:\Users\ASUS ZenBook I5>npm -v
evalmachine.<anonymous>:27
const { Math, Object } = primordials;
                         ^

ReferenceError: primordials is not defined
    at evalmachine.<anonymous>:27:26
    at Object.<anonymous> (C:\Users\ASUS ZenBook I5\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\fs.js:11:8)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (C:\Users\ASUS ZenBook I5\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:959:30)

node.js v12.13.1

Whipple's
  • 1
  • 1

2 Answers2

0

Possible duplicate: npm ReferenceError: primordials is not defined (node.js)

The problem seems to be graceful-fs - maybe it's even enough to run the following?

npm cache clean --force
0

Uninstall node go to \AppData\Roaming\npm\node_modules\npm delete this npm folder, now install node nad that is all.

Tyler2P
  • 2,324
  • 26
  • 22
  • 31