title: VS Code extension code unable to find JSON path
body: <p>I'm trying to create a vs code extension that requires (or imports ;)) to read data from a local JSON file. I've kept the JSON in the root folder (same folder where I have my <code>extension.js</code>, <code>package.json</code>, <code>.gitignore</code>, etc). My code uses <code>fs</code> package to read the JSON file, but when I run the command in constructor, I get the following error,</p>
  
  <pre><code>Error: ENOENT: no such file or directory, open 'fieldIds.json'
  </code></pre>
  
  <p>I read somewhere that the file path is relative to the folder from where node starts. I'm not sure from which folder node starts when I run my VS Code. But if I place my JSON in that folder, then should this work? How do I specify that I want to run the JSON from a specific path only (eg, Desktop?).</p>
  
  <p>I tried to move my JSON file to the same folder as VS Code editors <code>settings.json</code>, but that didn't work either.</p>
  
  <pre><code>/Users/&lt;user&gt;/Library/Application Support/Code/User
  </code></pre>
  
  <p>Here's what my folder structure looks like</p>
  
  <p><a href="https://i.stack.imgur.com/VH5Sh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VH5Sh.png" alt="enter image description here"></a></p>
  
  <p>...and here's the code from extension</p>
  
  <pre><code>const vscode = require('vscode')
  const fs = require('fs')
  
  function activate (context) {
    // 'fieldIds.json' not found    
    const json = fs.readFile('fieldIds.json', 'utf8', (res) =&gt; console.log(res))
    console.log(JSON.stringify(json))
  
    ...
    context.subscriptions.push(...)
  }
  </code></pre>
  
  <p>Help.</p>