React-dates: Getting - cannot read property 'create' of undefined - React 16

Created on 16 Nov 2017  路  12Comments  路  Source: airbnb/react-dates

screen shot 2017-11-16 at 8 54 22 am

needs react-dateinitialize

Most helpful comment

That's pretty far back; and it shouldn't be needed.

The implication is that ThemedStyleSheet is undefined.

Perhaps you haven't done import 'react-dates/initialize'; at the beginning of your application, which is noted in the readme? @firaskrichi @EstebanBorai does this fix your issue?

All 12 comments

What version of react-dates are you using? What does npm ls react-with-styles say? If you run npm update, does it fix it?

Here are my packages:

screen shot 2017-11-16 at 12 57 55 pm

And here is what I see when I run npm ls react-with-styles

screen shot 2017-11-16 at 1 01 51 pm

npm update doesn't help :/

@ljharb any ideas what's wrong I've tried a few things but without luck

Same issue here!
Im getting:
Uncaught TypeError: Cannot read property 'create' of undefined at Object.createLTR [as create] (main.js:112557) at WithStyles.maybeCreateStyles (main.js:9133) at WithStyles.componentWillMount (main.js:9119) at callComponentWillMount (main.js:61652) at mountClassInstance (main.js:61708) at updateClassComponent (main.js:63164) at beginWork (main.js:63548) at performUnitOfWork (main.js:65539) at slowWorkLoopThatChecksForFailedWork (main.js:65625) at workLoop (main.js:65593)

`-- [email protected] -- [email protected]`

was able to fix the issue temp. by reverting to react-dates 12.2.4

That's pretty far back; and it shouldn't be needed.

The implication is that ThemedStyleSheet is undefined.

Perhaps you haven't done import 'react-dates/initialize'; at the beginning of your application, which is noted in the readme? @firaskrichi @EstebanBorai does this fix your issue?

It worked for me thanks!

It seems like this has been resolved!

import 'react-dates/initialize';
fixed the problem for me.

@firaskrichi maybe you didn't create sql side in your project.

import 'react-dates/initialize'

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ekohanyi picture ekohanyi  路  3Comments

mrseanbaines picture mrseanbaines  路  3Comments

Daniel15 picture Daniel15  路  3Comments

sag1v picture sag1v  路  3Comments

aaronvanston picture aaronvanston  路  3Comments