Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error cannot find module 'umask'

I just installed nodejs x64 on my Windows 10 computer. I keep all default config, I open cmd and type: npm -v

Then i got 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)

Every command start with "npm" create this error and npm cannot uninstall, update itself) Please help me fix this error?

like image 221
SM-Flawless Avatar asked Oct 19 '22 02:10

SM-Flawless


2 Answers

update your npm

$ npm install npm -g
like image 195
Nitin9791 Avatar answered Oct 21 '22 05:10

Nitin9791


I would try to update/install NPM

$ npm update -g npm
like image 36
Cohars Avatar answered Oct 21 '22 05:10

Cohars