-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows 8 error: path.js:204 throw new TypeError('Arguments to path.join must be strings'); #300
Comments
Perfect bug report, thanks! We don't cover windows specifically in our test matrix, so understandable. |
Hi The reason is that cl.js uses HOME environment variable. Solutions:
or 2 SET HOME=XX or preferably 3 change line 135 in cl.js to regards |
Seems like we should be using |
Yes, it's better solution. regards |
One solution is to set default $HOME for every |
It looks like this was at least partially addressed by #304, yes? |
It is mitigated, yes, but the actual functionality provided by that line will be lost to Windows users (utilizing a config file in the user's home directory). |
So, a pull request from somebody with a windows box who can add the userprofile check and verify that rc in homedir is working, is welcome. |
Found this on js-beautify 1.4
Root cause: in js-beautify\js\lib\cli.js:135:22 process.env.HOME is undefined
Work around is to define the environment variable like so in powershell before invoking js-beautify
$env:HOME="c:\users\johndoe"
Note: I am operating under all defaults. I haven't customized the install in any way and it looks like js-beautify expects an environment variable HOME to be defined which is (sometimes) not the case
Full error
PS C:\Users\johndoe\code\html\bootstrapPlayground> js-beautify --file "C:\Users\johndoe\code\html\test.html"
path.js:204
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at f (path.js:204:15)
at Object.filter (native)
at Object.exports.join (path.js:209:40)
at Object.exports.interpret (C:\Users\johndoe\AppData\Roaming\npm\node_modules\js-beautify\js\lib\cli.js:135:22)
at Object. (C:\Users\johndoe\AppData\Roaming\npm\node_modules\js-beautify\js\bin\js-beautify.js:4:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
The text was updated successfully, but these errors were encountered: