mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.89k stars 32.26k forks source link

Update `latest` tag for published package #43538

Closed MonstraG closed 1 month ago

MonstraG commented 2 months ago

Steps to reproduce

This is not really a bug, but it broke my builds, and I have a repro:

  1. add mui packages to package.json with version latest or just copy the version from npm
  2. start using them and try building the app

Current behavior

Build fails because 5.0.0-beta.40 is marked as latest but is incompatible with other latest packages (v5 or v6 of mui/material)

error in the build:

build: ../../node_modules/.pnpm/@mui+base@5.0.0-beta.43_@types+react@18.3.4_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@mui/base/useSlider/useSlider.js
 Attempted import error: 'unstable_useIsFocusVisible' is not exported from '@mui/utils' (imported as 'useIsFocusVisible').

Expected behavior

It builds

Context

I believe the last version is 5.0.0-beta.58 now.

Your environment

npx @mui/envinfo ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```

Search keywords: latest mui/base v5

siriwatknp commented 1 month ago

@oliviertassinari Why do you transfer this issue to the core repo?

siriwatknp commented 1 month ago

@MonstraG Do you have @mui/base explicitly installed in your package.json?

oliviertassinari commented 1 month ago

Why do you transfer this issue to the core repo?

@siriwatknp Because the issue is with useSlider.ts. When I search where the source of it is: https://github.com/search?q=org%3Amui+useSlider.ts&type=code? I find it's in this repository. So I assume it's this repository scope?


Regarding the issue, the error says that the problem is with @mui/base@5.0.0-beta.43 installed, so the first thing to check is the package.json: https://unpkg.com/browse/@mui/base@5.0.0-beta.43/package.json. There, the problem seems clear:

  "@mui/utils": "^6.0.0-alpha.5"
},

range scope with an alpha? yeah, no, this is never going to work. The error says useIsFocusVisible is missing, yeap, sure, it got removed in #42467, released under "@mui/utils": "^6.0.0-beta.0", so šŸ™ƒ.

Build fails because 5.0.0-beta.40 is marked as latest but is incompatible with other latest packages (v5 or v6 of mui/material)

This is not accurate 5.0.0-beta.40 is compatible. 5.0.0-beta.43 isn't.

SCR-20240912-chrj

5.0.0-beta-58 seems to work fine https://www.npmjs.com/package/@mui/base?activeTab=versions.

To close this issue, I think that it's simply about doing one thing:

MonstraG commented 1 month ago

@MonstraG Do you have @mui/base explicitly installed in your package.json?

Yes, to import stuff (mostly tabs) from it.

siriwatknp commented 1 month ago

@oliviertassinari thanks for the info, updated 5.0.0-beta.58 to latest. @MonstraG please check and feel free to close the issue.

MonstraG commented 1 month ago

In all the ways I can observe, 5.0.0-beta.58 is latest and it works. Closing, thanks!

github-actions[bot] commented 1 month ago

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

[!NOTE] We value your feedback @MonstraG! How was your experience with our support team? We'd love to hear your thoughts in this brief Support Satisfaction survey. Your insights help us improve!