Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browser-sync tried to access chalk, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound #2021

Closed
kristian opened this issue Feb 28, 2023 · 7 comments

Comments

@kristian
Copy link

Issue details

Executing browser-sync with Yarn 2 PnP gives the following error:

browser-sync tried to access chalk, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Steps to reproduce/test case

Use browser-sync with Yarn 2

Checked in package.json file and indeed chalk is only defined as a devDependency however, because it is used in the public API, which is exposed to dependent packages it should be a dependency instead.

shakyShane pushed a commit that referenced this issue Mar 4, 2023
@shakyShane
Copy link
Contributor

Can you try browser-sync@2.28.2 🙏🏻

@kristian
Copy link
Author

kristian commented Mar 4, 2023

Thanks @shakyShane, that fixes it! 👍 Would you mind also fixing it for your eazy-logger? Same issue there:

shakyShane/eazy-logger#9

Thanks!

@kristian
Copy link
Author

kristian commented Mar 4, 2023

Mhm, just noticed, that eazy-logger is defined without a ^ here:

https://github.com/BrowserSync/browser-sync/blob/master/packages/browser-sync/package.json#L48

Meaning it issue still happens in eazy-logger and because it is hard linked to 4.0.0 fixing & bumping eazy-logger won't fix the issue either and another bump of browser-sync will be required. Sorry for that.

@shakyShane
Copy link
Contributor

@kristian try browser-sync@2.28.3

@kristian
Copy link
Author

kristian commented Mar 4, 2023

Jep, that fixed it! Thanks @shakyShane 🙏🏻

@shakyShane
Copy link
Contributor

@kristian thanks for bringing it to my attention

@kristian
Copy link
Author

kristian commented Mar 5, 2023

Very welcome, have a good one 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants