Error cannot find 'umask' module

I just installed nodejs x64 on my windows 10 computer. I keep all the default settings, I open cmd and print: npm -v

Then I got the following error:

module.js:457
    throw err;
    ^

Error: Cannot find module 'umask'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\W10-PRO\AppData\Roaming\npm\node_module\npm\lib\utils\umask.js:1:75)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)

Each command starts with "npm", creating this error, and npm cannot delete, update) Help me fix this error?

+4
source share
3 answers

update your npm number

$ npm install npm -g
+2
source

I would try updating / installing NPM

$ npm update -g npm
+1
source

!

nodejs.

npm nodejs (Program Files, Program Files (x86). AppData/Roaming ( npm npm-cache).

nodejs.

!

0

Source: https://habr.com/ru/post/1654457/


All Articles