Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production build error - p.update(...) is undefined - makeStyles/sidebar.js #4225

Closed
mjroeleveld opened this issue Dec 28, 2019 · 6 comments
Closed

Comments

@mjroeleveld
Copy link

mjroeleveld commented Dec 28, 2019

What you were expecting:
To have my local build work in production. I deleted node_modules and package-lock.json to have an identical environment but to no help.

What happened instead:
A broken production build. It prevents my from logging in. Shows this error when the url changes, leaving me with a white screen.

Related code:
I have a very minimal install with almost no customization.

Other information:

TypeError: "p.update(...) is undefined"
    nn makeStyles.js:119
    a makeStyles.js:234
    a makeStyles.js:187
    a makeStyles.js:226
    B Sidebar.js:110
    React 6
    unstable_runWithPriority scheduler.production.min.js:270
    React 5
    a hooks.js:17
    u CoreAdminRouter.js:210
    s CoreAdminRouter.js:139
    s CoreAdminRouter.js:69
    a CoreAdminRouter.js:21
react-dom.production.min.js:4636
    React 5
    unstable_runWithPriority scheduler.production.min.js:270
    React 4
    unstable_runWithPriority scheduler.production.min.js:270
    React 5
    a hooks.js:17
    u CoreAdminRouter.js:210
    s CoreAdminRouter.js:139
    s CoreAdminRouter.js:69
    a CoreAdminRouter.js:21

inspector shows me it's related to this:

    var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({
      link: true
    }, options));
    dynamicSheet.update(props).attach();

Environment

    "jsoneditor": "^7.0.4",
    "jsoneditor-react": "^1.0.1",
    "jwt-decode": "^2.2.0",
    "lodash": "^4.17.15",
    "moment": "^2.24.0",
    "prop-types": "^15.7.2",
    "query-string": "^6.5.0",
    "ra-input-markdown": "^1.1.1",
    "ra-input-rich-text": "^3.1.0",
    "react": "^16.9.0",
    "react-admin": "^3.1.1",
    "react-dom": "^16.9.0",
    "react-markdown": "^4.1.0",
    "react-mde": "^7.6.2",
    "react-scripts": "3.0.1",
    "react-transition-group": "^4.3.0",
    "showdown": "^1.9.0"
  • Browser:
    Latest Firefox & Chrome
@adrid
Copy link

adrid commented Dec 28, 2019

I was just going through the tutorial from the empty app and I have the same. seems there is a bug on the material-ui. This is fixing the issue for me for now

@OrenMe
Copy link

OrenMe commented Dec 29, 2019

hi @adrid where exactly did you add this? in your create-react-app package.json? in the react-admin package.json.
Also, is it required to upgrade @material-ui/core to ^4.8.1?

@adrid
Copy link

adrid commented Dec 29, 2019

@OrenMe hey - yes - in my project package.json. now I use 4.8.1 - changing of the version did not help me as this is a bug on some other dependency. This solution only works with yarn (resolutions option).

@OrenMe
Copy link

OrenMe commented Dec 29, 2019

Thanks @adrid!

@adrid
Copy link

adrid commented Dec 30, 2019

fixed in 4.8.2 so everything should work normally now (for me it does)

@ThieryMichel
Copy link
Contributor

Considered resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants