node安装完成后npm -v检查报错
本人node小白,在window server2012r2中安装node 12.13.0版本后,npm-v提示TypeError: Cannot read property ‘loaded’ of undefined,在网上找了好久没有找到同类型的错误,希望各位大佬帮我看一下
完整错误在这里
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-ha
ndler.js:216:3)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:78: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:81:7
at Array.forEach (<anonymous>)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80: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:
171: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-h
andler.js:97:27)
at process.errorHandler (C:\Program Files\nodejs\node_modules\[4mnpm[24m\l
ib\utils\error-handler.js:216:3)
[90m at process.emit (events.js:210:5)[39m
[90m at process._fatalException (internal/process/execution.js:150:25)[39m
6.12.0