You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently running 'yo typings foo' on a Windows machine fails unless you specifically set the HOME environment variable
» yo typings npm-node-json-db
path.js:7
throw new TypeError('Path must be a string. Received ' + inspect(path));
^
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.join (path.js:466:7)
at Object. (C:\Users\james\AppData\Roaming\npm\node_modules\generator-typings\generators\app\createTemplateCommands.js:9:31)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
Currently running 'yo typings foo' on a Windows machine fails unless you specifically set the HOME environment variable
Appears to be used in 2 places AFAICT
https://github.com/typings/generator-typings/blob/e412656ae9e847a6570564988c191d5a5d13bf26/generators/app/index.js#L19
https://github.com/typings/generator-typings/blob/e412656ae9e847a6570564988c191d5a5d13bf26/generators/app/createTemplateCommands.js#L9
AFAIK Node v4 is when the os.homedir() was added which you could use instead of you're already requiring (are you're ok requiring) v4 or later.
https://nodejs.org/api/os.html#os_os_homedir
Otherwise, you can use the os-homedir npm module as a polyfill, or even just use a simple function to check for win32 like in this SO answer
The text was updated successfully, but these errors were encountered: