All minor versions after 2.8.2 may be broken due to a completely changed package structure #8942
Replies: 6 comments 2 replies
-
The components are now all bundled inside the single @chakra-ui/react package, you shouldn't use the individual packages anymore. |
Beta Was this translation helpful? Give feedback.
-
Yeah but that should have been a major upgrade. In my case my project fails due to a dependency which included the individual packages as peer dependencies, so installing |
Beta Was this translation helpful? Give feedback.
-
Also got issues with missing libs and functions in chakra-ui libs setup using ^ in package.json's semantic versioning. |
Beta Was this translation helpful? Give feedback.
-
Is there any guidance on how to deal with issues when trying to upgrade to 2.9.0? After bumping the version my vite builds fail with: error during build:
[commonjs--resolver] Missing "./context" specifier in "@chakra-ui/utils" package
at e (file:///Users/bhaines/.nvm/versions/node/v21.2.0/lib/node_modules/vite/dist/node/chunks/dep-BEhTnQAI.js:45978:25)
at n (file:///Users/bhaines/.nvm/versions/node/v21.2.0/lib/node_modules/vite/dist/node/chunks/dep-BEhTnQAI.js:45978:627)
at o (file:///Users/bhaines/.nvm/versions/node/v21.2.0/lib/node_modules/vite/dist/node/chunks/dep-BEhTnQAI.js:45978:1297) My project isn't importing |
Beta Was this translation helpful? Give feedback.
-
When I try to run any unit test file that includes Chakra UI components, the test fails with the following error:
I'm using the following dependencies:
|
Beta Was this translation helpful? Give feedback.
-
I'm facing a similar issue with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Upgrading Chakra UI from 2.8.2 to 2.9 or 2.10 shouldn’t be an issue at all, since they are considered minor versions, but the distribution of the packages is completely different, causing projects dependent on older dependencies to completely break.
Also, the versions after 2.8.2 are not tagged here on GitHub, which adds even more confusion.
Here's the version 2.8.2 package.json file:
< 2.9.0
package.json
And here's the 2.9.0 one (and all subsequent ones):
>=2.9.0
package.json
}
Versions prior to 2.9.0 had more than 50 packages as dependencies, whereas versions after 2.9.0 only have 11 packages.
This should have been considered a major upgrade, since it breaks compatibility with any package built using the included dependencies by the react package, which are not currently included.
Beta Was this translation helpful? Give feedback.
All reactions