Process.platform returns \"win32\" for Windows. On Windows a user\'s home directory might be C:\\Users[USERNAME] or C:\\Documents and Settings[USERNAME] depending on which v
Use osenv.home(). It's maintained by isaacs and I believe is used by npm itself.
osenv.home()
https://github.com/isaacs/osenv