question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Having problems after upgrading to v4.

See original GitHub issue

After upgrading to v4 I’ve been getting this error

TypeError: Cannot read property 'root' of undefined
Toolbar
node_modules/@material-ui/core/esm/Toolbar/Toolbar.js:46
  43 |     variant = _props$variant === void 0 ? 'regular' : _props$variant,
  44 |     other = _objectWithoutProperties(props, ["classes", "className", "component", "disableGutters", "variant"]);
  45 | 
> 46 | var className = clsx(classes.root, classes[variant], !disableGutters && classes.gutters, classNameProp);
     | ^  47 | return React.createElement(Component, _extends({
  48 |   className: className,
  49 |   ref: ref
View compiled
renderWithHooks
node_modules/react-dom/cjs/react-dom.development.js:13450
  13447 |     ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
  13448 |   }
  13449 | }
> 13450 | var children = Component(props, refOrContext);
        | ^  13451 | 
  13452 | if (didScheduleRenderPhaseUpdate) {
  13453 |   do {
View compiled
updateForwardRef
node_modules/react-dom/cjs/react-dom.development.js:15014
  15011 | {
  15012 |   ReactCurrentOwner$3.current = workInProgress;
[...]

It repeats itself 13 times for different Mui components Ive exported. Ive tried degrading back to v3.9.3, like I used before but the problems persist so it might no be something intrinsic to v4.

Tech Version
Material-UI v3.9.3 / 4.0.1
React 16.8.6

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:33 (7 by maintainers)

github_iconTop GitHub Comments

11reactions
AnaBradecommented, Jul 2, 2019

Adding the dependency hoist-non-react-statics version 3.3.0 to our package.json solved the issue for us.

7reactions
travicommented, Jul 2, 2019

will likely be a bit before i can try another attempt at upgrading, but based on the description of what that package is responsible for and this output from npm ls hoist-non-react-statics (pre-upgrade attempt), i’d say thats very likely our issue as well:

β”œβ”€β”¬ @material-ui/core@3.9.3
β”‚ └── hoist-non-react-statics@3.3.0 
β”œβ”€β”¬ material-ui@0.20.2
β”‚ └─┬ recompose@0.26.0
β”‚   └── hoist-non-react-statics@2.5.5  deduped
β”œβ”€β”¬ react-hot-loader@4.12.0
β”‚ └── hoist-non-react-statics@3.3.0 
β”œβ”€β”¬ react-jss@8.6.1
β”‚ └── hoist-non-react-statics@2.5.5 
β”œβ”€β”¬ react-redux@7.1.0
β”‚ └── hoist-non-react-statics@3.3.0 
β”œβ”€β”¬ react-router@3.2.3
β”‚ └── hoist-non-react-statics@2.5.5  deduped
└─┬ recompose@0.30.0
  └── hoist-non-react-statics@2.5.5  deduped

thanks a ton for sharing @AnaBrade!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What to do if your Ventura update is stuck - Macworld
Problem : Mac freezes during installation Β· 1. Shut down, wait a few seconds, then restart your Mac Β· 2. Go to System...
Read more >
Samsung One UI 4.0, 4.1 & 4.1.1 (Android 12) update bug ...
A detailed & continuously updated round-up of everything related to Samsung One UI 4.0, 4.1 & 4.1.1 bugs, issues, and problems.
Read more >
iOS 16 Problems and Bugs with Fixes in 2022 - Tenorshare
Here we listed all iOS problems about updating. 1. Stuck on Verifying Update iOS 16; 2. iOS 16 Download Stuck; 3. Stuck on...
Read more >
If your iPhone or iPad won't update - Apple Support
Go to Settings > General > Software Update and download the latest update. If you don't see the update in the list of...
Read more >
Problems with update AP-LR from 4.0.10.9653 to 4.0.14.9736 ...
Hi i have two AP-LR 's and one AP-AC-PRO. In the UNIFi controller software i got the message that there was an upgrade...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found