Closed lmachens closed 5 years ago
@lmachens It's coming from a JSS version mismatch. You should have JSS v10 installed over JSS v9 in your project. Remove react-jss dependency, you don't need it.
I have exactly the same issue while I don't have react-jss
as a dependency.
@mkermani144 I'm facing the same issue using jss@9.8.7
same error solved by installing jss: 10.0.0-alpha.20
@MohammedFaragallah thanks. I was also getting a similar error which I believe was related to my implementation of a custom JSS prefix. Upgrading to 10.0.0-alpha.20 solved it.. I had removed react-jss and upgraded jss-rtl to latest but in the end material-ui still only referenced 10.0.0-alpha.17
` import React from 'react'; import { create } from 'jss'; import rtl from 'jss-rtl'; import { createGenerateClassName, StylesProvider, jssPreset } from '@material-ui/styles';
const jss = create({ plugins: [...jssPreset().plugins, rtl()] });
const generateClassName = createGenerateClassName({ productionPrefix: 'tc-', seed: "mp" });
function rtlJssProvider(props) { return (
) } `
I wonder what package exactly it conflicts with? because It was working a week ago, since then I didn't change anything in package.json and this exact same error happened today after beginning to use jss. however, after I upgraded to v10, it worked again.
Expected Behavior 🤔
should switch default style implementation and don't throw an error.
Current Behavior 😯
It throws this error when
install()
is called before and an component is mounted. When I remove this line, I don't get any error, but it uses the old style implements (of course).Storybook build:
Webpack build:
Steps to Reproduce 🕹
Not sure how to reproduce this issue. It do not happen on SSR and not in NextJS (I use @material-ui/styles in multiple projects).
But when I check my package-lock.json, I notice that css-vendor (where one of the errors is coming from) is installed in 0.3.8. But
supportedKeyframes
was added later. So I guess my packages are messed up.package.json
package-lock.json
I tried to manual update css-vendor, but then I get this error:
Any idea someone?