Hi @GrH, I’m not sure but the problem might be that you’re already assuming a POSIX path in the root string, and path.format() doesn’t know how to handle this… try using path.join('Users', 'joe') to apply the correct delimiter on both platforms. Also, shouldn’t that actually be dir and not root here anyway?
PS: Just had a look at the link, and they’re indeed saying:
// WINDOWS
require('path').format({ dir: 'C:\\Users\\joe', base: 'test.txt' }) // 'C:\\Users\\joe\\test.txt'