substack/node-browserify — Issue #93: Browserify creates subfolder named 'undefined' in project folder
Author: ashtuchkin
Created: 2011-11-25 12:51:29+00:00
State: open

When running node.js via monit script (which is not a rare situation), ```process.env.HOME``` is undefined. By default, the [file path of the cache.json is constructed relative to that directory](https://github.com/substack/node-browserify/blob/master/lib/wrap.js#L22), which is then given to deputy, which does mkdirp.

Solution would be f.ex. to check if ```process.env.HOME``` exists and if not, default to placing cache.json in project folder.

Current workaround: set ```cache: false```