This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Description
Before the change to use os-homedir, osenv.home() would return undefined in cases where HOME is not set.
After the change, home() throws an exception if it can't find a suitable home directory. This in turn means that importing the npm module at all fails, since it calls home() during startup.
This breaks things in environments like stripped-down containers where there is no home directory.
(I realize this change was made a long time ago, but a dependency of mine recently updated what version of the npm library it uses, suddenly causing these crashes.)
For now I am setting a dummy HOME in my environment, but this could have other side effects, so gracefully handling the lack of a home directory would be preferable.