SyntaxFix
Write A Post
Hire A Developer
Questions
Use osenv.home(). It's maintained by isaacs and I believe is used by npm itself.
osenv.home()
https://github.com/isaacs/osenv