title: Where is NPM config file?
body: <p>I edited the npm config file with <code>npm edit config</code>. I made a syntax error in it and saved the file. Now, no matter what I try with npm, it will complain about it. I know what the syntax is and I would like to fix it, but I can't find the file anywhere.</p>
  
  <pre><code>C:\Users\Arthur&gt;npm
  Error: Failed parsing JSON config key cache: "C:\Users\Le Roi Arthur\AppData\Roaming\npm-cache"
      at parseField (D:\nodejs\node_modules\npm\lib\config\core.js:376:13)
      at D:\nodejs\node_modules\npm\lib\config\core.js:330:24
      at Array.forEach (&lt;anonymous&gt;)
      at Conf.add (D:\nodejs\node_modules\npm\lib\config\core.js:328:23)
      at ConfigChain.addString (D:\nodejs\node_modules\npm\node_modules\config-chain\index.js:244:8)
      at Conf.&lt;anonymous&gt; (D:\nodejs\node_modules\npm\lib\config\core.js:316:10)
      at D:\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:90:16
      at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
  TypeError: Cannot read property 'loaded' of undefined
      at exit (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
      at errorHandler (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
      at D:\nodejs\node_modules\npm\bin\npm-cli.js:77:20
      at cb (D:\nodejs\node_modules\npm\lib\npm.js:225:22)
      at D:\nodejs\node_modules\npm\lib\npm.js:263:24
      at D:\nodejs\node_modules\npm\lib\config\core.js:83:7
      at Array.forEach (&lt;anonymous&gt;)
      at Conf.&lt;anonymous&gt; (D:\nodejs\node_modules\npm\lib\config\core.js:82:13)
      at Conf.f (D:\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
      at Object.onceWrapper (events.js:286:20)
  D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98
    var doExit = npm.config.loaded ? npm.config.get('_exit') : true
                            ^
  
  TypeError: Cannot read property 'loaded' of undefined
      at exit (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
      at process.errorHandler (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
      at process.emit (events.js:198:13)
      at process._fatalException (internal/bootstrap/node.js:496:27)
  Error: Failed parsing JSON config key cache: "C:\Users\Le Roi Arthur\AppData\Roaming\npm-cache"
      at parseField (D:\nodejs\node_modules\npm\lib\config\core.js:376:13)
      at D:\nodejs\node_modules\npm\lib\config\core.js:330:24
      at Array.forEach (&lt;anonymous&gt;)
      at Conf.add (D:\nodejs\node_modules\npm\lib\config\core.js:328:23)
      at ConfigChain.addString (D:\nodejs\node_modules\npm\node_modules\config-chain\index.js:244:8)
      at Conf.&lt;anonymous&gt; (D:\nodejs\node_modules\npm\lib\config\core.js:316:10)
      at D:\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:90:16
      at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
  TypeError: Cannot read property 'loaded' of undefined
      at exit (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
      at errorHandler (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
      at D:\nodejs\node_modules\npm\bin\npm-cli.js:77:20
      at cb (D:\nodejs\node_modules\npm\lib\npm.js:225:22)
      at D:\nodejs\node_modules\npm\lib\npm.js:263:24
      at D:\nodejs\node_modules\npm\lib\config\core.js:83:7
      at Array.forEach (&lt;anonymous&gt;)
      at Conf.&lt;anonymous&gt; (D:\nodejs\node_modules\npm\lib\config\core.js:82:13)
      at Conf.f (D:\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
      at Object.onceWrapper (events.js:286:20)
  D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98
    var doExit = npm.config.loaded ? npm.config.get('_exit') : true
                            ^
  
  TypeError: Cannot read property 'loaded' of undefined
      at exit (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
      at process.errorHandler (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
      at process.emit (events.js:198:13)
      at process._fatalException (internal/bootstrap/node.js:496:27)
  </code></pre>
  
  <p>Uninstalling and re-installing nodeJS doesn't fix the issue, the file is stored in cache somewhere. It's infuriately frustrating how hard it is to put my hands on that file. </p>
  
  <p><strong>Where can I find the npm config file ?</strong> </p>