Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i face this problem when i tried to run npm -v through windows command? #2161

Closed
loverphp487 opened this issue Sep 2, 2019 · 7 comments
Closed
Labels

Comments

@loverphp487
Copy link

loverphp487 commented Sep 2, 2019

i face this problem when i tried to run npm -v through windows command?

i uninstall the nodejs version 10.15.0 and install the new version 12.10.1 but the problem still exists after i have deleted all node_module and node folder from my pc the operating system is window 8.1

$ npm --versions
<!-- paste output here -->
Error: EINVAL: invalid argument, mkdir 'C:\Users\AmgadMohamadAdel\=c:\Users\AmgadMohamadAdel\AppData\Roaming'
TypeError: Cannot read property 'loaded' of undefined
    at exit (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:97:27)
    at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:215:3)
    at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:77:20
    at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:225:22)
    at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:263:24
    at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
    at Array.forEach (<anonymous>)
    at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
    at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
    at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:173:20)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:97
  var doExit = npm.config.loaded ? npm.config.get('_exit') : true
                          ^

TypeError: Cannot read property 'loaded' of undefined
    at exit (C:\Program Files\nodejs\node_modules\←[4mnpm←[24m\lib\utils\error-handler.js:97:27)
    at process.errorHandler (C:\Program Files\nodejs\node_modules\←[4mnpm←[24m\lib\utils\error-handler.js:215:3)
←[90m    at process.emit (events.js:209:13)←[39m
←[90m    at process._fatalException (internal/process/execution.js:150:25)←[39m
Error: EINVAL: invalid argument, mkdir 'C:\Users\AmgadMohamadAdel\=c:\Users\AmgadMohamadAdel\AppData\Roaming'
TypeError: Cannot read property 'loaded' of undefined
    at exit (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:97:27)
    at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:215:3)
    at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:77:20
    at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:225:22)
    at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:263:24
    at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
    at Array.forEach (<anonymous>)
    at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
    at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
    at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:173:20)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:97
  var doExit = npm.config.loaded ? npm.config.get('_exit') : true
                          ^

TypeError: Cannot read property 'loaded' of undefined
    at exit (C:\Program Files\nodejs\node_modules\←[4mnpm←[24m\lib\utils\error-handler.js:97:27)
    at process.errorHandler (C:\Program Files\nodejs\node_modules\←[4mnpm←[24m\lib\utils\error-handler.js:215:3)
←[90m    at process.emit (events.js:209:13)←[39m
←[90m    at process._fatalException (internal/process/execution.js:150:25)←[39m

$ node -p process.platform
<!-- paste output here -->
@Trott Trott transferred this issue from nodejs/nodejs.org Sep 3, 2019
@tniessen
Copy link
Member

What shell are you running this from? Is it cmd, PowerShell, or a different shell?

@gireeshpunathil
Copy link
Member

ping @loverphp487 - is this still unresolved?

@sidrakshe28
Copy link

Same,even I'm getting the same error.
can someone help with this?

@PoojaDurgad
Copy link

@loverphp487 and @sidrakshe28 - is this issue resolved? for me this issue looks similar to zkat/npx#100
hopefully it will help to resolve the issue.

@Rakedd
Copy link

Rakedd commented Oct 15, 2020

Try reseting the cache config argument by using the follwing command (it worked for me).
npm config set cache

@sidrakshe28
Copy link

yes its resolved. thank you:)

@PoojaDurgad
Copy link

closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants