Q:

Using 'fs' with browserify

How to use fs with fs with browserify
require('fs') returns an empty object
var fs = require('fs')

A:

You can't. Browserify, by its nature, is Node-style modules for the web browser. fs is a file system module. You can't access the file system from the web browser, for obvious security reasons. So even if you bundled Node's fs module into your web application, it wouldn't — and couldn't — work.
Most if not all of the built-in Node modules are incompatible with use on the browser.

