browser-sync-webpack-plugin icon indicating copy to clipboard operation
browser-sync-webpack-plugin copied to clipboard

Add support for browser-sync 3

Open jkevingutierrez opened this issue 1 year ago • 11 comments

browser-sync-webpack-plugin requires browsery-sync^2 as peer-dependency https://github.com/Va1/browser-sync-webpack-plugin/blob/master/package.json#L23

Now that browser-sync 3 was released, it generates a dependency conflict when both packages are used

image

jkevingutierrez avatar Jan 05 '24 14:01 jkevingutierrez

Just ran into this dependency conflict as well, when upgrading a project to browser-sync@3

nlenkowski avatar Jan 08 '24 11:01 nlenkowski

Hi, I have the same problem.

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/browser-sync npm ERR! dev browser-sync@"^3.0.2" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer browser-sync@"^2" from [email protected] npm ERR! node_modules/browser-sync-webpack-plugin npm ERR! dev browser-sync-webpack-plugin@"^2.3.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: [email protected] npm ERR! node_modules/browser-sync npm ERR! peer browser-sync@"^2" from [email protected] npm ERR! node_modules/browser-sync-webpack-plugin npm ERR! dev browser-sync-webpack-plugin@"^2.3.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

elrosi avatar Feb 02 '24 17:02 elrosi

Same here:

warning " > [email protected]" has incorrect peer dependency "browser-sync@^2".

goxmedia avatar Feb 03 '24 02:02 goxmedia

There's an updated repo on npm via npm install --save-dev browser-sync-v3-webpack-plugin

Jas-n avatar Feb 16 '24 16:02 Jas-n

Same here

AdamReznicek avatar Mar 22 '24 13:03 AdamReznicek

@Jas-n This did not work for me. As soon as I attempted to mix:

watch    
> mix watch

        Additional dependencies must be installed. This will only take a moment.
                                                                                             
        Running: npm install browser-sync-webpack-plugin@^2.3.0 --save-dev --legacy-peer-deps
                                                                                             
        Finished. Please run Mix again.

caleb-pierce avatar Apr 03 '24 21:04 caleb-pierce

@Jas-n This did not work for me. As soon as I attempted to mix:

watch    
> mix watch

        Additional dependencies must be installed. This will only take a moment.
                                                                                             
        Running: npm install browser-sync-webpack-plugin@^2.3.0 --save-dev --legacy-peer-deps
                                                                                             
        Finished. Please run Mix again.

That's normal for the first run.

Just run the run command again. You won't see it next time 😊.

Jas-n avatar Apr 04 '24 06:04 Jas-n

@Jas-n when running npm install --save-dev browser-sync-v3-webpack-plugin and then calling .browserSync(), it will still say:

watch    
> mix watch

        Additional dependencies must be installed. This will only take a moment.
                                                                                             
        Running: npm install browser-sync-webpack-plugin@^2.3.0 --save-dev --legacy-peer-deps
                                                                                             
        Finished. Please run Mix again.

Which then proceeds to install the older version and the issue still persists.

brvm avatar Apr 19 '24 08:04 brvm

I can confirm that the fix mentioned by @Jas-n does not work when using it together with the laravel-mix package. Manual installation of the new package works fine, but laravel-mix always installs the old browser-sync-webpack-plugin automatically again. Unfortunately I didn't find a way to prevent this.

FeBe95 avatar Apr 26 '24 16:04 FeBe95

I can confirm that the fix mentioned by @Jas-n does not work when using it together with the laravel-mix package. Manual installation of the new package works fine, but laravel-mix always installs the old browser-sync-webpack-plugin automatically again. Unfortunately I didn't find a way to prevent this.

I am having the same issue. Security vulnerability still persists.

Could we get some other more people to review https://github.com/mozilla/ssl-config-generator/pull/235 and abandon this project switching to a fork that supports v3? I am unsure of the etiquette here as this project hasn't had a release since 2020.

caleb-pierce avatar Apr 30 '24 21:04 caleb-pierce

I can confirm that the fix mentioned by @Jas-n does not work when using it together with the laravel-mix package. Manual installation of the new package works fine, but laravel-mix always installs the old browser-sync-webpack-plugin automatically again. Unfortunately I didn't find a way to prevent this.

I am having the same issue. Security vulnerability still persists.

Could we get some other more people to review mozilla/ssl-config-generator#235 and abandon this project switching to a fork that supports v3? I am unsure of the etiquette here as this project hasn't had a release since 2020.

Added my review to it. Hopefully this will pick up more traction!

TJCrouch avatar Jun 25 '24 21:06 TJCrouch