Breaking change when upgrading
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
Hi there,
I have a project that includes @mui
with their corresponding dependencies. Details in the Your Environment
section below.
But when I decide to upgrade @mui
to latest release:
yarn upgrade @mui/material @mui/x-data-grid @mui/icons-material
My build breaks like this:
yarn run v1.22.10
$ tsc && vite build
node_modules/@types/react-transition-group/node_modules/@types/react/index.d.ts:3125:14 - error TS2300: Duplicate identifier 'LibraryManagedAttributes'.
3125 type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@types/react/index.d.ts:3090:14
3090 type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
~~~~~~~~~~~~~~~~~~~~~~~~
'LibraryManagedAttributes' was also declared here.
node_modules/@types/react-transition-group/node_modules/@types/react/index.d.ts:3136:13 - error TS2717: Subsequent property declarations must have the same type. Property 'a' must be of type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>', but here has type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>'.
3136 a: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
~
…and other type errors in my project files.
I am attaching yarn.lock
diff with upgraded packages.
Expected behavior 🤔
Clean build.
Steps to reproduce 🕹
Steps:
- Build a TS project with
@mui
libraries specified inYour Environment
- Make
yarn upgrade @mui/material @mui/x-data-grid @mui/icons-material
- Try build the project again -
yarn build
- Errors happen.
Context 🔦
yarn.lock diff here:
index 70f25dc..9da4ac1 100644
--- a/ui/yarn.lock
+++ b/ui/yarn.lock
@@ -217,14 +217,14 @@
"@babel/plugin-syntax-jsx" "^7.16.7"
"@babel/types" "^7.17.0"
-"@babel/runtime@^7.1.2", "@babel/runtime@^7.13.10", "@babel/runtime@^7.17.2", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.7":
+"@babel/runtime@^7.1.2", "@babel/runtime@^7.13.10", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6":
version "7.17.8"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.8.tgz#3e56e4aff81befa55ac3ac6a0967349fd1c5bca2"
integrity sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==
dependencies:
regenerator-runtime "^0.13.4"
-"@babel/runtime@^7.10.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.15.4":
+"@babel/runtime@^7.10.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.2", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7":
version "7.17.9"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72"
integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==
@@ -450,37 +450,38 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
-"@mui/base@5.0.0-alpha.72":
- version "5.0.0-alpha.72"
- resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-alpha.72.tgz#551d64402ee5065cf81fd1388a3e7ab8c426fe3e"
- integrity sha512-WCAooa9eqbsC68LhyKtDBRumH4hV1eRZ0A3SDKFHSwYG9fCOdsFv/H1dIYRJM0rwD45bMnuDiG3Qmx7YsTiptw==
+"@mui/base@5.0.0-alpha.75":
+ version "5.0.0-alpha.75"
+ resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-alpha.75.tgz#0b352ff951765dfa83723fd1faf46a128dfe63ca"
+ integrity sha512-eQ8SP2ML5nJyOdSqmk26ezg/eEP1k42Z+k6uMfNbgHZc8iZwgw9iVe+6g5j/qZPKS88AtxVG8YsLLZkXT82/Bw==
dependencies:
"@babel/runtime" "^7.17.2"
"@emotion/is-prop-valid" "^1.1.2"
- "@mui/utils" "^5.4.4"
- "@popperjs/core" "^2.11.3"
+ "@mui/types" "^7.1.3"
+ "@mui/utils" "^5.6.0"
+ "@popperjs/core" "^2.11.4"
clsx "^1.1.1"
prop-types "^15.7.2"
react-is "^17.0.2"
-"@mui/base@5.0.0-alpha.75":
- version "5.0.0-alpha.75"
- resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-alpha.75.tgz#0b352ff951765dfa83723fd1faf46a128dfe63ca"
- integrity sha512-eQ8SP2ML5nJyOdSqmk26ezg/eEP1k42Z+k6uMfNbgHZc8iZwgw9iVe+6g5j/qZPKS88AtxVG8YsLLZkXT82/Bw==
+"@mui/base@5.0.0-alpha.78":
+ version "5.0.0-alpha.78"
+ resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-alpha.78.tgz#9d0ee8c913969f60cd7072a6082e3c0652be0b74"
+ integrity sha512-5L+GNe2M9/tFjQpjK2r837+kzRg/l6D5R9SQbG1wmSWejw5Ei8P+KXIgS/NLNi9g7dUT8bnCyzz9AZKQX1Jsfg==
dependencies:
"@babel/runtime" "^7.17.2"
"@emotion/is-prop-valid" "^1.1.2"
"@mui/types" "^7.1.3"
- "@mui/utils" "^5.6.0"
- "@popperjs/core" "^2.11.4"
+ "@mui/utils" "^5.6.1"
+ "@popperjs/core" "^2.11.5"
clsx "^1.1.1"
prop-types "^15.7.2"
react-is "^17.0.2"
"@mui/icons-material@^5.5.1":
- version "5.5.1"
- resolved "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.5.1.tgz#848a57972617411370775980cbc6990588d4aafb"
- integrity sha512-40f68p5+Yhq3dCn3QYHqQt5RETPyR3AkDw+fma8PtcjqvZ+d+jF84kFmT6NqwA3he7TlwluEtkyAmPzUE4uPdA==
+ version "5.6.2"
+ resolved "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.6.2.tgz#239c40fc5841dc7c6af7d00e4e988550de170fcd"
+ integrity sha512-9QdI7axKuBAyaGz4mtdi7Uy1j73/thqFmEuxpJHxNC7O8ADEK1Da3t2veK2tgmsXsUlAHcAG63gg+GvWWeQNqQ==
dependencies:
"@babel/runtime" "^7.17.2"
@@ -501,15 +502,15 @@
rifm "^0.12.1"
"@mui/material@^5.5.1":
- version "5.5.1"
- resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.5.1.tgz#9ca89a8b32afd59c843a5bc0332b0786cf9bf1d0"
- integrity sha512-bJSYgymgSZ7btPTNnWFrr2EmGoVQc4A/0WLfP/ESY2dxnhnbFDwt7twiOKmJp3u84YXriEDt5v9EZQLf7A+y0Q==
+ version "5.6.3"
+ resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.6.3.tgz#a5b6cd1b0417fca67a65172530ff5573ab7bc453"
+ integrity sha512-2VovFsbCEhic29NYoBF7zFrpH2sEOlKXXDhGjzxmWiI9OnC3SX63hapWunjaVsiRINVnjuMHuW1MOs4UtV8Gfg==
dependencies:
"@babel/runtime" "^7.17.2"
- "@mui/base" "5.0.0-alpha.72"
- "@mui/system" "^5.5.1"
+ "@mui/base" "5.0.0-alpha.78"
+ "@mui/system" "^5.6.3"
"@mui/types" "^7.1.3"
- "@mui/utils" "^5.4.4"
+ "@mui/utils" "^5.6.1"
"@types/react-transition-group" "^4.4.4"
clsx "^1.1.1"
csstype "^3.0.11"
@@ -518,15 +519,6 @@
react-is "^17.0.2"
react-transition-group "^4.4.2"
-"@mui/private-theming@^5.4.4":
- version "5.4.4"
- resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.4.4.tgz#cc2b2d897888ce5d1c319adfa2c50c0063a649ab"
- integrity sha512-V/gxttr6736yJoU9q+4xxXsa0K/w9Hn9pg99zsOHt7i/O904w2CX5NHh5WqDXtoUzVcayLF0RB17yr6l79CE+A==
- dependencies:
- "@babel/runtime" "^7.17.2"
- "@mui/utils" "^5.4.4"
- prop-types "^15.7.2"
-
"@mui/private-theming@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.6.0.tgz#b907e055a0a19caf554d5b43209a143edaa9b398"
@@ -536,13 +528,13 @@
"@mui/utils" "^5.6.0"
prop-types "^15.7.2"
-"@mui/styled-engine@^5.4.4":
- version "5.4.4"
- resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.4.4.tgz#8991b2e2dd47ae60071e7f042a5fab8e6e092e82"
- integrity sha512-AKx3rSgB6dmt5f7iP4K18mLFlE5/9EfJe/5EH9Pyqez8J/CPkTgYhJ/Va6qtlrcunzpui+uG/vfuf04yAZekSg==
+"@mui/private-theming@^5.6.2":
+ version "5.6.2"
+ resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.6.2.tgz#c42da32f8b9481ba12885176c0168a355727c189"
+ integrity sha512-IbrSfFXfiZdyhRMC2bgGTFtb16RBQ5mccmjeh3MtAERWuepiCK7gkW5D9WhEsfTu6iez+TEjeUKSgmMHlsM2mg==
dependencies:
"@babel/runtime" "^7.17.2"
- "@emotion/cache" "^11.7.1"
+ "@mui/utils" "^5.6.1"
prop-types "^15.7.2"
"@mui/styled-engine@^5.6.0":
@@ -554,18 +546,13 @@
"@emotion/cache" "^11.7.1"
prop-types "^15.7.2"
-"@mui/system@^5.5.1":
- version "5.5.1"
- resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.5.1.tgz#1f2b2a8c5542db6176e3b5a8ed12aea602cdeb81"
- integrity sha512-2hynI4hN8304hOCT8sc4knJviwUUYJ7XK3mXwQ0nagVGOPnWSOad/nYADm7K0vdlCeUXLIbDbe7oNN3Kaiu2kA==
+"@mui/styled-engine@^5.6.1":
+ version "5.6.1"
+ resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.6.1.tgz#e2c859a4dbdd65af89e77703a0725285aef471fd"
+ integrity sha512-jEhH6TBY8jc9S8yVncXmoTYTbATjEu44RMFXj6sIYfKr5NArVwTwRo3JexLL0t3BOAiYM4xsFLgfKEIvB9SAeQ==
dependencies:
"@babel/runtime" "^7.17.2"
- "@mui/private-theming" "^5.4.4"
- "@mui/styled-engine" "^5.4.4"
- "@mui/types" "^7.1.3"
- "@mui/utils" "^5.4.4"
- clsx "^1.1.1"
- csstype "^3.0.11"
+ "@emotion/cache" "^11.7.1"
prop-types "^15.7.2"
"@mui/system@^5.6.0":
@@ -582,6 +569,20 @@
csstype "^3.0.11"
prop-types "^15.7.2"
+"@mui/system@^5.6.3":
+ version "5.6.3"
+ resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.6.3.tgz#a03ad6d61b0b7d304a8af60374e27e71e7818ef7"
+ integrity sha512-4SRi52a4ttZ2S4EHEDE8arVNuKqyQLTYUTF80WAZ0tQwnG20qwlBtzcrywCGItmVAMl7RUaYopyWOx3yVPvrmQ==
+ dependencies:
+ "@babel/runtime" "^7.17.2"
+ "@mui/private-theming" "^5.6.2"
+ "@mui/styled-engine" "^5.6.1"
+ "@mui/types" "^7.1.3"
+ "@mui/utils" "^5.6.1"
+ clsx "^1.1.1"
+ csstype "^3.0.11"
+ prop-types "^15.7.2"
+
"@mui/types@^7.1.3":
version "7.1.3"
resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.1.3.tgz#d7636f3046110bcccc63e6acfd100e2ad9ca712a"
@@ -598,10 +599,10 @@
prop-types "^15.7.2"
react-is "^17.0.2"
-"@mui/utils@^5.4.4":
- version "5.4.4"
- resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.4.4.tgz#bd7dde4f48f60c02b6debf976bd74f3505b188fe"
- integrity sha512-hfYIXEuhc2mXMGN5nUPis8beH6uE/zl3uMWJcyHX0/LN/+QxO9zhYuV6l8AsAaphHFyS/fBv0SW3Nid7jw5hKQ==
+"@mui/utils@^5.6.1":
+ version "5.6.1"
+ resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.6.1.tgz#4ab79a21bd481555d9a588f4b18061b3c28ea5db"
+ integrity sha512-CPrzrkiBusCZBLWu0Sg5MJvR3fKJyK3gKecLVX012LULyqg2U64Oz04BKhfkbtBrPBbSQxM+DWW9B1c9hmV9nQ==
dependencies:
"@babel/runtime" "^7.17.2"
"@types/prop-types" "^15.7.4"
@@ -610,11 +611,11 @@
react-is "^17.0.2"
"@mui/x-data-grid@^5.6.1":
- version "5.6.1"
- resolved "https://registry.yarnpkg.com/@mui/x-data-grid/-/x-data-grid-5.6.1.tgz#039d42a2b7f649371e26181c1efb7329b5fb833e"
- integrity sha512-qFyQtGi/ZL8zkmOp4dbAykiu8d/Dd9kt1QZrk7yq7NyMZdCLRRAGa7TH0sweOXJPzRIBmHEOUPVycRt20pVAGA==
+ version "5.10.0"
+ resolved "https://registry.yarnpkg.com/@mui/x-data-grid/-/x-data-grid-5.10.0.tgz#22917a8c1a6e95a2d3cde691f53071a838cba0e2"
+ integrity sha512-+NELUtA+6RAVFHR8sGrSxtJC8+3NQMLflYBm816DXjQvPA8vvCPI50SPKCUYUpBuepQtTBQWcty0Tdm9tjzInA==
dependencies:
- "@mui/utils" "^5.4.4"
+ "@mui/utils" "^5.6.1"
clsx "^1.1.1"
prop-types "^15.8.1"
reselect "^4.1.5"
@@ -655,12 +656,7 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"
-"@popperjs/core@^2.11.3":
- version "2.11.4"
- resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.4.tgz#d8c7b8db9226d2d7664553a0741ad7d0397ee503"
- integrity sha512-q/ytXxO5NKvyT37pmisQAItCFqA7FD/vNb8dgaJy3/630Fsc+Mz9/9f2SziBoIZ30TJooXyTwZmhi1zjXmObYg==
-
-"@popperjs/core@^2.11.4":
+"@popperjs/core@^2.11.4", "@popperjs/core@^2.11.5":
version "2.11.5"
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.5.tgz#db5a11bf66bdab39569719555b0f76e138d7bd64"
integrity sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==
@@ -780,9 +776,9 @@
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
"@types/prop-types@*", "@types/prop-types@^15.7.4":
- version "15.7.4"
- resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.4.tgz#fcf7205c25dff795ee79af1e30da2c9790808f11"
- integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==
+ version "15.7.5"
+ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf"
+ integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==
"@types/react-dom@^17.0.10":
version "17.0.14"
@@ -805,7 +801,16 @@
dependencies:
"@types/react" "*"
-"@types/react@*", "@types/react@^17.0.33":
+"@types/react@*":
+ version "18.0.8"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.8.tgz#a051eb380a9fbcaa404550543c58e1cf5ce4ab87"
+ integrity sha512-+j2hk9BzCOrrOSJASi5XiOyBbERk9jG5O73Ya4M0env5Ixi6vUNli4qy994AINcEF+1IEHISYFfIT4zwr++LKw==
+ dependencies:
+ "@types/prop-types" "*"
+ "@types/scheduler" "*"
+ csstype "^3.0.2"
+
+"@types/react@^17.0.33":
version "17.0.41"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.41.tgz#6e179590d276394de1e357b3f89d05d7d3da8b85"
integrity sha512-chYZ9ogWUodyC7VUTRBfblysKLjnohhFY9bGLwvnUFFy48+vB9DikmB3lW0qTFmBcKSzmdglcvkHK71IioOlDA==
Your environment 🌎
Working setup:
npx: installed 2 in 4.107s
System:
OS: Linux 5.11 Ubuntu 21.04 (Hirsute Hippo)
Binaries:
Node: 14.19.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.16 - /usr/local/bin/npm
Browsers:
Chrome: Not Found
Firefox: 96.0
npmPackages:
@emotion/react: ^11.8.2 => 11.8.2
@emotion/styled: ^11.8.1 => 11.8.1
@mui/base: 5.0.0-alpha.72
@mui/icons-material: ^5.5.1 => 5.5.1
@mui/lab: 5.0.0-alpha.76
@mui/material: ^5.5.1 => 5.5.1
@mui/private-theming: 5.6.0
@mui/styled-engine: 5.6.0
@mui/system: 5.6.0
@mui/types: 7.1.3
@mui/utils: 5.4.4
@mui/x-data-grid: ^5.6.1 => 5.6.1
@mui/x-date-pickers: 5.0.0-alpha.0
@types/react: ^17.0.33 => 17.0.41
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
typescript: ^4.5.4 => 4.6.2
Broken setup:
npx: installed 2 in 0.47s
System:
OS: Linux 5.11 Ubuntu 21.04 (Hirsute Hippo)
Binaries:
Node: 14.19.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.16 - /usr/local/bin/npm
Browsers:
Chrome: Not Found
Firefox: 96.0
npmPackages:
@emotion/react: ^11.8.2 => 11.8.2
@emotion/styled: ^11.8.1 => 11.8.1
@mui/base: 5.0.0-alpha.78
@mui/icons-material: ^5.5.1 => 5.6.2
@mui/lab: 5.0.0-alpha.76
@mui/material: ^5.5.1 => 5.6.3
@mui/private-theming: 5.6.0
@mui/styled-engine: 5.6.0
@mui/system: 5.6.0
@mui/types: 7.1.3
@mui/utils: 5.6.0
@mui/x-data-grid: ^5.6.1 => 5.10.0
@mui/x-date-pickers: 5.0.0-alpha.0
@types/react: ^17.0.33 => 17.0.41
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
typescript: ^4.5.4 => 4.6.2
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
What is a breaking change in software? [closed] - Stack Overflow
So, yes, database changes will typically be breaking changes (unless there is code to auto-upgrade and possibly auto-downgrade as required).
Read more >Breaking changes | Elastic Installation and Upgrade Guide [8.5]
Before you upgrade, you must review the breaking changes for each product you use and make the necessary changes so your code is...
Read more >Breaking changes - GitHub Docs
Breaking changes are changes that can potentially break an integration. Breaking changes include:
Read more >Breaking changes reference overview - .NET - Microsoft Learn
Use this reference section to find breaking changes that might apply to you if you're upgrading your app to a newer version of...
Read more >How to upgrade to npm packages with breaking changes?
Ideally, there should be a helper module/file for using npm packages to avoid changes in the whole codebase in the event of breaking...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am also using react 17 and had the same problem. I worked around this problem by modifying
tsconfig.json
.@Dragomir-Ivanov I’m closing the issue due to inactivity. If the problem still exists, please open a new one.