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

[BUG] Cannot read property 'loaded' of undefined #691

Closed
Vickout opened this issue Jan 14, 2020 · 2 comments
Closed

[BUG] Cannot read property 'loaded' of undefined #691

Vickout opened this issue Jan 14, 2020 · 2 comments
Labels
Bug thing that needs fixing

Comments

@Vickout
Copy link

Vickout commented Jan 14, 2020

What / Why

I can't do anything with the command npm. I've tried to uninstall and update npm even install again, but any command of npm shows me the following error below:

i'm using on Windows 7
.

How

Current Behavior

PS C:\Windows\system32> npm --version
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 ()
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 ()
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. (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 ()
at Conf. (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
6.13.4

Steps to Reproduce

  • npm --version
  • npm install
  • npm uninstall sax --save
@DanielRuf
Copy link

The main problem is

PS C:\Windows\system32> npm --version
Error: Failed to replace env in config: ${APPDATA}

It seems you are in powershell. Did you already try another shell like the Git Bash or cmd?

@darcyclarke darcyclarke added the Bug thing that needs fixing label Oct 30, 2020
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

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

No branches or pull requests

3 participants