Browsersync page refresh loop

sage9

#1

My config file:

{
  "entry": {
    "main": [
      "./scripts/main.js",
      "./styles/main.scss"
    ],
    "customizer": [
      "./scripts/customizer.js"
    ]
  },
  "publicPath": "/wp-content/themes/cars",
  "devUrl": "http://cars.info",
  "proxyUrl": "http://localhost:3000",
  "cacheBusting": "[name]_[hash:8]",
  "watch": [
    "app/**/*.php",
    "config/**/*.php",
    "resources/views/**/*.php"
  ]
}

after yarn start my localhost:3000 refreshes instantly… What I do wrong?
all path are ok
and everything was ok, before I installed some npm-libs


#2

Are you devUrl and canonical URL for WordPress the same?

Also, using a .info TLD for a development site is most likely not a good idea. I would recommend switch it to .test or .localhost as they are reserved for purposes like development.


#3

yes, there are
I can access my webpage by this domain


#4

Is this your development URL? Is the site being served by a local web server like MAMP or something similar? Sage’s development process only works for a development site served locally. (Reread the original post, sorry.)

If you delete your node_modules and rerun yarn && yarn start does it work? Or if you remove those packages you installed does it work?

Also, are there any error messages that Webpack is displaying?


If none of that works, In resources/assets/build/webpack.config.watch.js, temporarily add the following so we can get some useful debugging output:

    new BrowserSyncPlugin({
      target,
      open: config.open,
      proxyUrl: config.proxyUrl,
      watch: config.watch,
      delay: 500,
+     advanced: {
+       browserSync: {
+         logLevel: 'debug',
+       },
+     },
    }),

Once you’ve added that, run yarn start and report on or dump the output here.


#5

no… removing dependencies, later removing whole node_modules and yarn - doesn’t help

also: here is output http://prntscr.com/jvadmk


#6

Am having the same issue as well. Is there a fix?


#7

@kotmatpockuh First, make sure there is no other processes running on port 3000 with sudo fkill :3000 then run yarn start again. If it keeps refreshing, open chrome developers tools and right click on the browser site reload button then click empty cache with force refresh. Should be good.