NPM probleem is, kan niet worden gelezen Bezit 'geladen' of undefined

stemmen
0

Ik kan het niet verwijderen of een upgrade van NPM als ik wil doen. Het probleem hieronder volgt:

    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

Ik lees de docs en ik heb niet iets dat werkte vinden. Ik heb geprobeerd om het bestand .npmrc te verwijderen, maar het bestaat niet in de directory.

De vraag is gesteld op 13/01/2020 om 23:54
bron van user
In andere talen...                            

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