propriedade problema NPM, não consegue ler 'carregado' de indefinido

votos
0

Eu não consigo desinstalar ou atualizar npm como eu quero fazer. O problema segue abaixo:

    Error: Failed to replace env in config: ${APPDATA}
        at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:415:13
        at String.replace (<anonymous>)
        at envReplace (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:411:12)
        at parseField (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:389:7)
        at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:330:24
        at Array.forEach (<anonymous>)
        at Conf.add (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:328:23)
        at ConfigChain.addString (C:\Program Files\nodejs\node_modules\npm\node_modules\config-chain\index.js:244:8)
        at Conf.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:316:10)
        at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:115:16
    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: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 Conf.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13)
        at Conf.f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
        at Conf.emit (events.js:223:5)
    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:216:3)
←[90m    at process.emit (events.js:223:5)←[39m
←[90m    at process._fatalException (internal/process/execution.js:150:25)←[39m

Eu li os docs e eu não encontrar algo que funcionou. Tentei remover a .npmrc arquivo, mas ele não existe no directório.

Publicado 13/01/2020 em 23:54
fonte usuário
Em outras línguas...                            

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more