react-toolbox-themr icon indicating copy to clipboard operation
react-toolbox-themr copied to clipboard

TypeError: Cannot read property 'shape' of undefined

Open sundayhd opened this issue 8 years ago • 6 comments

Getting error when trying to see my app:

TypeError: Cannot read property 'shape' of undefined ./node_modules/react-css-themr/lib/utils/themr-shape.js C:/Projects/reacttoolboxstarter/node_modules/react-css-themr/lib/utils/themr-shape.js:7 4 | 5 | var _react = require('react'); 6 |

7 | exports.default = _react.PropTypes.shape({ 8 | theme: _react.PropTypes.object.isRequired 9 | }); 10 |

using react-toolbox-themr and react-toolbox 2.0.6 beta read everything from readme... any help?

sundayhd avatar Sep 30 '17 14:09 sundayhd

Bump. Getting the same error using the default create react app and the Get Started page.

aaahrens avatar Oct 04 '17 01:10 aaahrens

react 16.0.0 changed the behaviour. downgrade to 15.6.2 is work for me.

rokugou avatar Oct 06 '17 13:10 rokugou

I confirm dowgrading to 15.6.2 works fine except theme is not applied in my case

aat-antoine avatar Oct 12 '17 06:10 aat-antoine

The install copypasta is out of date. It says to install version beta.6, but when installing separately yarn installs version beta.12. Which makes sense considering recent the react changes are. Beta.12 works perfectly with React 16.

@aat-antoine you also import the css at the top level. I forgot that when i was starting it, might be the case.

aaahrens avatar Oct 12 '17 09:10 aaahrens

@drunkengranite same omission o_O. Thx, you are a life saver :)

aat-antoine avatar Oct 12 '17 12:10 aat-antoine

The version beta.12 indeed fixes this issue, however when I add specifically

"react-toolbox": "2.0.0-beta.12"

the old typing is still used. Is the updated version add to npm?

jervtub avatar Oct 28 '17 16:10 jervtub