isaacs/npm — Issue #2123: devDependencies 'bin' files aren't exposed to 'scripts' like "test" on Windows
Author: TooTallNate
Created: 2012-02-04 20:23:52+00:00
State: open

Say you have this in your `package.json`:

``` json
...
"scripts": {
"test": "mocha"
},
"devDependencies": {
"mocha": "*"
}
...
```

So now I have mocha installed locally, not globally, and when I execute `npm test` I would expect mocha to be exposed to the PATH, but it isn't, at least on Windows. It's a little hard to test if it's working on Unix since I have `./node_modules/.bin` in my `$PATH` already, so it always works as expected. But currently I have to change the "test" line to something hacky like:

``` json
"test": "node ./node_modules/mocha/bin/mocha
```

Would be killer to get that fixed. Thanks!