Upgrading @mui/material to v6 produces yarn dependency warning on @types/react
@siriwatknp is already working on this.
Since Mar 6, 2025.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Steps to reproduce
Steps:
- Open this link to live example: https://codesandbox.io/p/devbox/q4fpmy
- Open terminal and execute
yarn install - 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.