Closed ab35 closed 5 years ago
On windows operating systems, the method toISOString() does not produce a valid filesystem path:
toISOString()
const fileName = path.join('pictures', new Date().toISOString() + '.jpeg');
A quick fix that solves the issue:
const fileName = path.join('pictures', `${new Date().toISOString().replace(/:/g,'-')}.jpeg`);
Thanks. https://github.com/GoogleChromeLabs/carlo/commit/ac0271a6ea21d4cefa51605e4bcba375053b7e8c
On windows operating systems, the method
toISOString()
does not produce a valid filesystem path:A quick fix that solves the issue: