title: NestJS Reading File - No Such File or Directory
body: <p>I am having trouble getting my nestJS app to read my cert secret file and even a simple txt file. I  am getting the error:</p>
  <pre><code>ERROR [ExceptionsHandler] ENOENT: no such file or directory
  </code></pre>
  <p>Below is all I am doing, using fs to read the file:</p>
  <pre><code>import {FireblocksSDK, PeerType, TransactionArguments, TransactionOperation, TransactionStatus} from &quot;fireblocks-sdk&quot;;
  import fs = require('fs');
  import path = require('path');
  
  function fireblocks() {
      const text = fs.readFileSync(('./data.txt'), 'utf8');
      console.log(text);
      const apiSecret = fs.readFileSync(path.resolve(__dirname, &quot;../../certs/fireblocks_secret.key&quot;), &quot;utf8&quot;);
      return new FireblocksSDK(apiSecret, process.env.FIREBLOCKS_ACCESS_TOKEN);
  }
  </code></pre>
  <p>Below is my file structure I am using:</p>
  <pre><code>ERROR [ExceptionsHandler] ENOENT: no such file or directory
  </code></pre>
  <p><a href="https://i.stack.imgur.com/CpP1v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CpP1v.png" alt="enter image description here" /></a></p>