isaacs/npm — Issue #1582: Prefix setting on windows
Author: isaacs
Created: 2011-10-21 21:48:50+00:00
State: open
Labels: isaacs-says-yes, windows

On windows, the node executable might not live somewhere in the PATH, and even still, it's very unusual to have the whole `/{bin,lib,share}` type of folder setup.

Instead of going up two directories and then appending `lib/node_modules`, just put stuff in folders based on where the node.exe lives:

```
C:\node\node.exe
C:\node\npm.cmd
C:\node\node_modules\npm\
C:\node\vows.cmd
C:\node\node_modules\vows\
```

The global `npm.dir` in this case would be `C:\node\node_modules`, and the global `npm.prefix` would be `C:\node`.