Comments (8)
Hmm that is strange, that function is definitely available in @chakra-ui/react^2.0.0
. It's possible something got messed up with lingering dependencies from an older version of chakra-react-select
. Here's a couple options for what you could try (in the order I'd try them) to see if its a simple fix:
- Uninstall
@chakra-ui/react
andchakra-react-select
completely then install them again one at a time in that order - Wipe out your
node_modules
folder and try a fresh install - Wipe out your
node_modules
andpackage-lock.json
(oryarn.lock
?) and try a fresh install
If none of those work I can take a deeper look into it. I see you have yarn listed under your engines
field, is that what you're using? If so it might be a yarn thing, I've been having trouble getting the whole dependencies/peer dependencies thing working consistently on both npm
and yarn
. So if none of those work, and you are using yarn, let me know which version of it you're using.
from chakra-react-select.
Thanks @kafiln I think I've figured out what's causing issue but I'm still not sure specifically why it's happening. createStylesContext
was not added in @chakra-ui/[email protected]
as I thought, it was actually added in @chakra-ui/[email protected]
. If I want to keep using it I should pin that peer dep to that version or above, which I'm not sure I want to do just yet as is could cause conflicts.
The part I'm confused about is why a version of @chakra-ui/system
lower than v2.1.2
would be getting installed, especially if you're trying a fresh install after deleting the yarn.lock
@benjamincharity. Unless the default behavior of yarn is just to install whatever the base version of a peer dep is, ignoring the ^
to allow for higher versions?
I actually just tried making a test app with yarn, installing all of the dependencies from scratch, and I'm not seeing this issue. Could you search your yarn.lock
file for all instances of @chakra-ui/system
and let me know if any of them are listed as lower than v2.1.2
?
Regardless of your answer, I'm planning to revert back to the StylesProvider
component and useStyles
hook I was using in v4.1.2
for now, but it would be nice to have as many details as I can get to avoid introducing this issue in the future.
from chakra-react-select.
Sorry for the delay @csandman - I just added this package back to my Chakra v2 app and DO see older versions of chakra system in my lock file. Looking through our dependencies and tracked it down to this item:
"@snek-at/storybook-addon-chakra-ui": "^1.0.0",
This was forcing a 1.x install of chakra system. Once I removed that package, yarn.lock
and node_modules
and did a fresh install this package is working just fine 👍
Thanks again for looking into this!
from chakra-react-select.
Thanks for the quick response!
We are using Yarn v1.22.19
- I tried this after trying to remove the
yarn.lock
file and see the same results - I have tried this a few times with no luck.
- I just not tried this and while I still get the error in the browser I also see the warning in console now:
And the browser error leads me here:
from chakra-react-select.
I'm having the exact same issue described above !
The issue seem to be present on version 4.1.3
but fortunately not on 4.1.2
, so a quick workaround for me was to use version 4.1.2
from chakra-react-select.
Ok, I ended up fixing it by just removing the need for a styles context in the first place. The change has been published in v4.1.4.
Before upgrading to it @benjamincharity I'm still curious about my question in my last comment, whether or not you have any instances of @chakra-ui/system
in your yarn.lock
file. This would definitely help me troubleshoot issues like this in the future!
And If either of you are still having any issues after upgrading, feel free to re-open!
from chakra-react-select.
I saw this issue with createStylesContext
as well. It seems odd that they would deprecate the original StylesProvider
for this new approach, since the Chakra docs currently don't explain it or what it does.
from chakra-react-select.
@matthewrose it does seem odd, but my solution was just to stop using the old and new methods entirely just to not have to think about it.
The Chakra docs could definitely use some work though...
from chakra-react-select.
Related Issues (20)
- [BUG] Warning: Prop `id` did not match. Server: HOT 1
- [BUG] name and required does not work with standard form validation HOT 2
- [BUG]: `colorScheme` doesn't get passed to input variants HOT 4
- [BUG] `selectedOptionStyle` and `variant` are missing from `Select` types. HOT 16
- selectedOptionStyle with isMulti HOT 1
- [BUG] Breaking Change in chakraui/icon HOT 6
- Property "size" does not exist on type HOT 1
- [BUG] "default" is not exported by "node_modules/@chakra-ui/icon/dist/index.mjs", imported by "node_modules/chakra-react-select/dist/esm/chakra-components/menu.js". HOT 1
- [BUG] useBasicStyles type error on Vite HOT 1
- [BUG] Group Heading props does not work HOT 3
- [Feature request] Allow adding some related keywords to dropdown items so that they can be searched based on those keywords HOT 1
- [BUG] Problem with accessibility of the CreatableSelect (nested interactive elements) HOT 1
- [BUG] peerDependencies to Chakra v2 still show up HOT 5
- [BUG] Cannot start the application when using chakra-react-select with Vite HOT 2
- [BUG] Custom components automatically switch to Chakra style instead of keeping default HOT 1
- [BUG]: No `ValueType` export for the `onChange` handler HOT 11
- property data-testid is not render
- [BUG] Version 4.7.6 breaks colors for selected item HOT 2
- [BUG] LoadOptions doesn't render options when isMulti = True and there is already one selected option in component HOT 1
- [BUG] Incompatible with Chakra UI Pro theme HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chakra-react-select.