nodejitsu/require-analyzer — pull request #58 by mhart (2013-01-30 00:16:25+00:00)
Title: Fix TypeError in case of missing node_modules dir

If you run `require-analyzer` on a directory without a `node_modules` directory, you get the following error:

```
/usr/local/share/npm/lib/node_modules/require-analyzer/lib/require-analyzer.js:178
if (dep in pkgs && pkgs[dep].dependencies) {
^
TypeError: Cannot read property 'dependencies' of undefined
at analyzer.npmAnalyze (/usr/local/share/npm/lib/node_modules/require-analyzer/lib/require-analyzer.js:178:50)
at Array.forEach (native)
at analyzer.npmAnalyze (/usr/local/share/npm/lib/node_modules/require-analyzer/lib/require-analyzer.js:177:25)
at /usr/local/share/npm/lib/node_modules/require-analyzer/node_modules/read-installed/read-installed.js:118:5
at /usr/local/share/npm/lib/node_modules/require-analyzer/node_modules/read-installed/read-installed.js:234:14
at asyncMap (/usr/local/share/npm/lib/node_modules/require-analyzer/node_modules/read-installed/node_modules/slide/lib/async-map.js:27:18)
at next (/usr/local/share/npm/lib/node_modules/require-analyzer/node_modules/read-installed/read-installed.js:200:5)
at /usr/local/share/npm/lib/node_modules/require-analyzer/node_modules/read-installed/read-installed.js:157:7
at LOOP (fs.js:1138:14)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
```

This commit fixes that.