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

Upgrading @mui/material to v6 produces yarn dependency warning on @types/react #45490

Open
Jul13nT opened this issue Mar 5, 2025 · 0 comments
Assignees
Labels
dependencies Update of dependencies status: waiting for maintainer These issues haven't been looked at yet by a maintainer v6.x migration

Comments

@Jul13nT
Copy link

Jul13nT commented Mar 5, 2025

Steps to reproduce

Steps:

  1. Open this link to live example: https://codesandbox.io/p/devbox/q4fpmy
  2. Open terminal and execute yarn install
  3. The following warning is displayed:
➤ YN0002: │ react@workspace:. doesn't provide @types/react (p55ea0), requested by @mui/material and other dependencies.

Current behavior

When upgrading @mui/material dependency from 5.16.14 to 6.4.6 and using Yarn PnP mode, running yarn install produces a dependency warning.

Expected behavior

Usingyarn install should not produce any warning, as it was the case in MUI 5.x.

Context

I'm trying to upgrade my project from MUI 5.x to 6.x and I don't understand why this warning appears. I checked the package.json of @mui/material but I don't see any changes that could cause this issue.
I don't want to include the dependency on @types/react in my project because I don't use Typescript and including this dependency causes a strange bug when the application is built.

Your environment

npx @mui/envinfo
System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    npm: 9.8.1 - /usr/local/bin/npm
    pnpm: 8.10.2 - /usr/local/share/npm-global/bin/pnpm
  Browsers:
    Chrome: Not Found

Search keywords: yarn pnp react types dependency v6

@Jul13nT Jul13nT added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 5, 2025
@zannager zannager added dependencies Update of dependencies v6.x migration labels Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Update of dependencies status: waiting for maintainer These issues haven't been looked at yet by a maintainer v6.x migration
Projects
None yet
Development

No branches or pull requests

3 participants