unvt / charites

It is an application to style vector tiles easily
https://unvt.github.io/charites/
MIT License
54 stars 13 forks source link

deleting/renaming files cause charites serve to crash #180

Closed keichan34 closed 3 weeks ago

keichan34 commented 1 month ago

Describe the bug When charites serve is running, deleting or renaming YAML files cause the error:

Error: ENOENT: no such file or directory, stat '/home/keita/workspace/.../{old file name}'
    at statSync (node:fs:1659:25)
    at FSWatcher.<anonymous> (node:internal/fs/recursive_watch:160:28)
    at FSWatcher.emit (node:events:518:28)
    at FSWatcher._handle.onchange (node:internal/fs/watchers:215:12) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: '/home/keita/workspace/.../{old file name}'
}

To Reproduce

  1. Create charites style.yml
  2. Reference another file using !!inc/file ....yml
  3. Run charites serve style.yml
  4. Move or rename that file (directly referenced files also cause charites to crash)

Expected behavior Charites should not crash. In the case of a missing file, an error message should be printed to the console, similar to style validation errors.

Screenshots n/a

Charites Version:

Desktop (please complete the following information):

keichan34 commented 3 weeks ago

Some more investigating:

Doing some more investigating, I found this: https://github.com/nodejs/node/issues/52018

Looks like a Node issue in 20.x. They say that they'll be backporting it. Closing.