SnowdogApps / magento2-frontools

Set of front-end tools for Magento 2 based on Gulp.js
MIT License
430 stars 142 forks source link

browsersync stream failed #432

Closed sickdaflip closed 2 years ago

sickdaflip commented 2 years ago

I can't get the browsersync stream to run, everything is installed correctly. As a test I used your alpaca theme. All console outputs are okay ... only when I press f5 does it load the new css, but that's not the point. does anyone have any experience with this problem?

Igloczek commented 2 years ago

Do you see in the HTML source the code injected by BrowserSync server?

image

sickdaflip commented 2 years ago

Hi @Igloczek, thanks for your response! yes the browser-sync code injection works...

change "snowdog_components -> _button-var
BROWSER-SYNC detect change -> no stream!
Igloczek commented 2 years ago

Let's ignore the Magento part, it's not related at all, so any Composers, bin/magentos, caches etc. doesn't matter here, as long as you have some working site.

The only part of M that might be affecting the BS is enabled minification, so files are served as styles.min.css instead of styles.css.

You don't have to run any other commands before dev, it's already there.

Could you show me exactly how your console output looks like (screenshot) and what is your Node.js version, what you used to install dependencies (I see npm at the beginning, but later you are using yarn, so I'm kinda confused), and what is your host OS?

sickdaflip commented 2 years ago

Thank you for your efforts. after yarn remove browser-sync && yarn add browser-sync@2.26.13 it works :sweat_smile:

Igloczek commented 2 years ago

Um weird... so you was using npm to install the dependencies initially and then started using yarn?

sickdaflip commented 2 years ago

yeah strange right ?! after a few changes it didn't work again ... now set browser-sync to an older version 2.18.12 ( https://github.com/BrowserSync/browser-sync/issues/1553 ) and it works. It didn't matter whether I do everything by npm or yarn

my test env is like our live system ubuntu 20.04 nginx 1.21.3 with php-fpm node 12.13.0 npm 6.12.0 yarn 1.22.11 composer 2.1.8

So it has nothing to do with Frontools, it was definitely due to browser-sync in connection with my system. Thanks again @Igloczek