title: fs.readFileSync is not a function?
body: <p>I'm trying to make a bot to run client-side and control a third-party page, but this error appears I am using a browser.</p>
  <pre><code>Uncaught TypeError: fs.readFileSync is not a function, 
  </code></pre>
  <p>here is my code</p>
  <pre><code> global.apostar = function() {
      var fs = require('fs')//require
      var src = fs.readFileSync(__dirname + '/file.txt')
      const nodeExternals = require('webpack-node-externals')
      module.exports = {    
          entry: './bundle.js',
          target: 'node',
          externals: [nodeExternals()],
          output: {
              path: path.join(__dirname, 'build'),
              filename: 'bundle.js'
        }
      }
      const auxiliar = require(electron)
      const{Builder, By, Key, util} = require('selenium-webdriver')
      async function example() {//construir o chrome webdriver
          let driver = await new Builder().forBrowser(&quot;firefox&quot;).build()
          await driver.get(&quot;http://google.com&quot;)
          await driver.findElement(By.name(&quot;q&quot;)).sendKeys(&quot;Selenium&quot;,Key.RETURN)
      }
      example()
          //call function
  }
  </code></pre>