Skip to content


filter out dotfiles like .bin #1

merged 1 commit into from

2 participants


If a module has bin scripts in the "bin" field of package.json, npm puts symlinks to the bin scripts in node_modules/.bin. This confuses npmlv because there is no node_modules/.bin/package.json. This patch excludes dotfiles like .bin from the directories checked in node_modules/.

@youurayy youurayy merged commit 5cc22d4 into youurayy:master

i seriously have no idea how i closed this, as i want to merge this. looking for a way to undo.


@substack - is it possible for you to reopen this?


ah got it, you actually included this change in the other pull req, so this one got closed automagically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 28, 2013
  1. @substack

    filter out dotfiles like .bin

    substack committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/npmlv.js
4 lib/npmlv.js
@@ -11,7 +11,9 @@ program
var res = {};
var base = process.cwd() + '/node_modules';
-var dirs = fs.readdirSync(base);
+var dirs = fs.readdirSync(base)
+ .filter(function (dir) { return !/^\./.test(dir) });
for(var i = 0; i < dirs.length; i++) {
var module = dirs[i];
var bdir = base + '/' + module;
Something went wrong with that request. Please try again.