-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
external dependencyBlocked by external dependency, we can’t do anything about it.Blocked by external dependency, we can’t do anything about it.type: bugIt doesn't behave as expected.It doesn't behave as expected.
Description
Current behavior 😯
Building a project on React 17 throws the following errors when running build.
@mui/material: v5.2.0
webpack: 5.64.2
react: 17.0.2
EDIT: Seems to be related to a change in @mui/utils where an attempt is made to check for the existence of useId in react: 3323b23#diff-41d8fb02706e8d95b775dfa0caadade00dbbcb017d7f2c7acbc3100c5a02d46f
Expected behavior 🤔
Build should work on React 17 as v5.2.0 is a minor release and React 18, which includes these imports, is not yet released.
Steps to reproduce 🕹
Steps:
- Clone the following repo: https://github.com/sachinahya/mui-5.2.0-build-error
- Run
yarn build.
To reproduce working example:
- Change version of
@mui/materialin package.json to~5.1.0. - Add the following resolutions to package.json:
"resolutions": {
"@mui/utils": "~5.1.0"
},Context 🔦
No response
Your environment 🌎
`npx @mui/envinfo`
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
external dependencyBlocked by external dependency, we can’t do anything about it.Blocked by external dependency, we can’t do anything about it.type: bugIt doesn't behave as expected.It doesn't behave as expected.
