visual-differ icon indicating copy to clipboard operation
visual-differ copied to clipboard

Feature: use Path for better cross platform support

Open khawkins98 opened this issue 2 years ago • 1 comments

This stops errors on Windows like:

PS C:\...\Documents\GitHub\visual-differ> node index.js

Generating images from your URLs...
 ■■■■■■■■■■■■■■■■■■■■                    ■ 50% | ETA: 15s | 1/2

Diffing images and creating report...
                                         ■ 0% | ETA: 0s | 0/1node:fs:599
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'screenshots/2022_12_28__11-54-53/1/a.png'
    at Object.openSync (node:fs:599:3)
    at Object.readFileSync (node:fs:467:35)
    at C:\Users\...\Documents\GitHub\visual-differ\index.js:97:10 {
  errno: -4058,
  syscall: 'open',
  code: 'ENOENT',
  path: 'screenshots/2022_12_28__11-54-53/1/a.png'
}

Node.js v18.4.0

khawkins98 avatar Dec 28 '22 11:12 khawkins98

I've also tossed in a package.json dependency update. Meant to do that as a separate PR.

khawkins98 avatar Dec 28 '22 11:12 khawkins98