node -v): v6.5.0npm -v): 4.0.2I installed a fresh copy of Laravel 5.4.9. I then followed the instructions on the Laravel docs for using browsersync. It doesnt work though. I get the error.
mix.browserSync();
^
TypeError: mix.browserSync is not a function
So I read to install (which is not specified in the docs):
and do some other config to get it working by adding the plugin to webpack. Still can't get it to work. I thought, by looking at the docs that browsersync support was out of the box?
npm run watchYou have version 0.6.0 of Laravel Mix, and we're currently on 0.8.8. Update to the latest version.
Why did that version get pulled in with the latest version of laravel? Just so I know for future how to get around situation where the package.json has older versions in it :)
I don't know how you installed Laravel. You can see on GitHub that Laravel references the latest version of Mix.
https://github.com/laravel/laravel/blob/master/package.json#L14
Yeah I noticed that as well. I pulled it in by running this command
composer create-project laravel/laravel blog which gave me the latest version of laravel. When I tried the one listed on the laravel site composer create-project laravel/laravel blog --prefer-dist it gave me an older 5.4 version.
I installed laravel via composer through phpstorm new project wizard. and webpack version was old for me too.updating solved the issue
Most helpful comment
You have version 0.6.0 of Laravel Mix, and we're currently on 0.8.8. Update to the latest version.