BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io
https://discord.gg/2d2xUThp
Apache License 2.0
12.19k stars 757 forks source link

Failing to update #2022

Open quiltedstars opened 1 year ago

quiltedstars commented 1 year ago

Issue details

When I tried to call via "browser-sync start --server 'Practice' --index test.html --files="." it will load, but once I update the file (test.html) it will fail.

Originally it spit back that "System limit for number of file watchers reached" and told me that my chibios download was the cause, so I deleted it. Now I am getting this response:

 --------------------------------------
       Local: http://localhost:3000
    External: http://192.168.2.165:3000
 --------------------------------------
          UI: http://localhost:3001
 UI External: http://localhost:3001
 --------------------------------------
[Browsersync] Serving files from: Practice
[Browsersync] Watching files...
[Browsersync] Reloading Browsers... (buffered 5 events)
[Browsersync] Reloading Browsers...
node:internal/errors:490
    ErrorCaptureStackTrace(err);
    ^

Error: EACCES: permission denied, watch '/home/mags/.steam/debian-installation/steamapps/compatdata/1245620/pfx/dosdevices/z:/boot/efi'
    at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
    at Object.watch (node:fs:2332:36)
    at createFsWatchInstance (/usr/local/lib/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:119:15)
    at setFsWatchListener (/usr/local/lib/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:166:15)
    at NodeFsHandler._watchWithNodeFs (/usr/local/lib/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:331:14)
    at NodeFsHandler._handleDir (/usr/local/lib/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:567:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NodeFsHandler._addToNodeFs (/usr/local/lib/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:617:16)
Emitted 'error' event on FSWatcher instance at:
    at FSWatcher._handleError (/usr/local/lib/node_modules/browser-sync/node_modules/chokidar/index.js:647:10)
    at NodeFsHandler._addToNodeFs (/usr/local/lib/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:645:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -13,
  syscall: 'watch',
  code: 'EACCES',
  path: '/home/mags/.steam/debian-installation/steamapps/compatdata/1245620/pfx/dosdevices/z:/boot/efi',
  filename: '/home/mags/.steam/debian-installation/steamapps/compatdata/1245620/pfx/dosdevices/z:/boot/efi'
}

Node.js v19.7.0

Affected platforms

Browsersync use-case

If CLI, please paste the entire command below

browser-sync start --server 'Practice' --index text.html --files="."

quiltedstars commented 1 year ago

Managed to get it working by going into the directory itself and running

browser-sync start --server --index test.html --files "*.*"

However, I think it's still an issue that it's running through all my files (or at least the ones via WINE?) if I mistakenly insert what I thought was the directory, as per the example:

Examples Start a server from the app directory, watching all files

I mean, I guess it works if it is watching all files in every directory, but my assumption would've been it's watching all files within the directory, in this case 'Practice'.

So even though I fixed it, I feel like this is still an issue?