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

browser-sync crashes sometimes with #1983

Open jamesRUS52 opened 2 years ago

jamesRUS52 commented 2 years ago

Issue details

From time to time after update js files crashes with file not found exception

webpack compiled successfully [Browsersync] Proxying: http://app.test [Browsersync] Access URLs:

   Local: http://localhost:3000
External: http://false:3000

      UI: http://localhost:3001

UI External: http://localhost:3001

[Browsersync] Watching files... [Browsersync] Reloading Browsers... [Browsersync] Reloading Browsers... [Browsersync] Reloading Browsers... [Browsersync] Reloading Browsers... [Browsersync] Reloading Browsers... [Browsersync] Reloading Browsers... [Browsersync] Reloading Browsers... [Browsersync] Reloading Browsers... [Browsersync] Reloading Browsers... node:internal/process/promises:288 triggerUncaughtException(err, true / fromPromise /); ^

[Error: ENOENT: no such file or directory, open '/iims/resources/js/app/main.js~'] { errno: -2, code: 'ENOENT', syscall: 'open', path: '/iims/resources/js/app/main.js~' }

Node.js v18.1.0

Please specify which version of Browsersync, node and npm you're running

Affected platforms

Browsersync use-case

If CLI, please paste the entire command below

npm run watch

as "scripts": { "dev": "npm run development", "development": "mix", "watch": "mix watch", "watch-poll": "mix watch -- --watch-options-poll=1000", "hot": "mix watch --hot", "prod": "npm run production", "production": "mix --production" },

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

Laravel MIX

mix.browserSync({ files: [ "resources/js/app/main.js", "resources/css/.css", "resources/sass/.scss", "resources/views/*/.blade.php", ], open: false, notify: false });

What is the file /iims/resources/js/app/main.js~ (with tilda at end) ? Temporary file of browser-sync or not? and why browser-sync craches with it (this file not listed in file list mask)