TypeError: context.stylis is not a function #78
Replies: 19 comments
-
That's interesting! Haven't encountered this before. 🤔 Could you provide a small repro of this issue? |
Beta Was this translation helpful? Give feedback.
-
It's hard to provide a small repro.
|
Beta Was this translation helpful? Give feedback.
-
I wonder if this is caused by the emotion cache 🤔 that's the only place where we define a We use Storybook for local development, and it works as expected locally. Is your code open source? Perhaps I could take a look at your code. |
Beta Was this translation helpful? Give feedback.
-
Do you think this PR might help? |
Beta Was this translation helpful? Give feedback.
-
Most likely not, because either way, we'll need to install What version of Storybook and React are you using? I'll try to reproduce it on my end. |
Beta Was this translation helpful? Give feedback.
-
I'm sorry about the late response. This is still a problem. "@storybook/addon-storysource": "5.3.18", "react": "^17.0.2", |
Beta Was this translation helpful? Give feedback.
-
Could you try updating your Storybook to the latest version? |
Beta Was this translation helpful? Give feedback.
-
I tried and it didn't help. |
Beta Was this translation helpful? Give feedback.
-
Works fine on my end 🤔. See this CodeSandbox (You'll probably need to restart the codesandbox script) |
Beta Was this translation helpful? Give feedback.
-
There is some progress, but I'm now getting a different error.
This is the error. Any idea?
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Could this be a tooling issue on your end? 🤔 Are you able to share the project or able to create a small repro? |
Beta Was this translation helpful? Give feedback.
-
I'm not able to share the project, but give me some ideas what check.
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Could the issue above be caused by mismatched React or react-dom versions? I see the general 'You might have mismatching versions of React and the renderer (such as React DOM)'. Jotai's current package.json says it is using v18.20 of React and react-dom. But in our application, we are using React (and react-dom) v17.0.2. I don't think there are two copies of React running, so wondering if using 17 is incompatible with jotai-devtools. |
Beta Was this translation helpful? Give feedback.
-
@MGray-ATX / @AjaxSolutions - Jotai DevTools supports react Here is a Sandbox with React 17 + latest Storybook, so doesn't seem like a react 17 issue. 🤔 You make a valid point though — could be this error Could you run one of these to verify if all the versions of react and react-dom are deduped and exactly match what you're using? Feel free to post the output here if too if you're unsure # if you're using npm
npm list react react-dom
# or if you're using yarn
yarn list react react-dom |
Beta Was this translation helpful? Give feedback.
-
@arjunvegda Thanks for the response. I had checked that already, and we are using 17.0.2 across everything (for both React and react-dom). The app was set up with create-react-app. It hasn't been ejected, or had the Webpack modified. It's a stock installation. |
Beta Was this translation helpful? Give feedback.
-
@arjunvegda This is our setup. I'm not able to fork your sandbox.
|
Beta Was this translation helpful? Give feedback.
-
Oh, that's strange! 🤔 I update my CodeSandbox with the code snippet you provided. Works as expected. Is this only an issue with Storybook? Does the DevTools work outside of the storybook i.e. in your main application? |
Beta Was this translation helpful? Give feedback.
-
I installed DevTools and I'm seeing an error. Any idea what might be happening?
I found this tip, but removing node_modules didn't help.
storybookjs/storybook#6093
Beta Was this translation helpful? Give feedback.
All reactions