[英]Browsersync no longer works
I'm learning Laravel in combination with Vue and I installed Browsersync to make the process smoother.我正在结合 Vue 学习 Laravel,我安装了 Browsersync 以使过程更顺畅。 When I first installed it worked flawlessly.
当我第一次安装它时,它完美无缺。
My setup is the following:我的设置如下:
npm i browser-sync --save-dev
npm i browser-sync --save-dev
在本地安装 BrowsersyncC:\\WEB\\project_folder\\
C:\\WEB\\project_folder\\
php -S localhost:8000 -t public
to serve the app. php -S localhost:8000 -t public
为应用程序提供服务。 If I go to localhost:8000
it works as expectedlocalhost:8000
它会按预期工作mix.browserSync({proxy: 'localhost:8000', browser: "C:\\\\Program Files (x86)\\\\Google\\\\Chrome Beta\\\\Application\\\\chrome.exe", notify: false});
mix.browserSync({proxy: 'localhost:8000', browser: "C:\\\\Program Files (x86)\\\\Google\\\\Chrome Beta\\\\Application\\\\chrome.exe", notify: false});
in webpack.mix.js
webpack.mix.js
npm run watch
to build and run Browsersync npm run watch
来构建和运行 Browsersync Strange thing is that the Browsersync UI works properly if I acces localhost:3001
, even from another device in the network.奇怪的是,如果我访问
localhost:3001
,即使是从网络中的另一台设备,Browsersync UI 也能正常工作。
I observed it wasn't working anymore while creating another project where I use Parcel for bundling instead of webpack/laravel-mix.我观察到它在创建另一个项目时不再起作用,在该项目中我使用 Parcel 进行捆绑而不是 webpack/laravel-mix。 There I use the Browsersync CLI, running
.\\node_modules\\.bin\\browser-sync start --proxy localhost:8000 --no-notify --cwd 'C:\\WEB\\project_folder' -f 'public'
在那里我使用 Browsersync CLI,运行
.\\node_modules\\.bin\\browser-sync start --proxy localhost:8000 --no-notify --cwd 'C:\\WEB\\project_folder' -f 'public'
I did not update Node, npm or the OS in the meantime.在此期间,我没有更新 Node、npm 或操作系统。 The only thing I installed is the game Valorant which has some fancy anti cheat service that is installed, but I disabled that service.
我唯一安装的是游戏 Valorant,它安装了一些花哨的反作弊服务,但我禁用了该服务。
I tried:我试过:
I guess next time I will use Docker to have a isolated environment.我想下次我会使用Docker来拥有一个隔离的环境。
I'm stumped.我难住了。 Any ideas?
有任何想法吗? Have anyone encountered and solved this?
有没有人遇到并解决过这个问题?
This was possibly caused by Windows.这可能是由 Windows 引起的。 I've installed kb4571744 and everything works again.
我已经安装了 kb4571744 并且一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.