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

Conflicts with Laravel Nova's DateTimePicker #45

Closed
mikebronner opened this issue Aug 7, 2019 · 5 comments
Closed

Conflicts with Laravel Nova's DateTimePicker #45

mikebronner opened this issue Aug 7, 2019 · 5 comments

Comments

@mikebronner
Copy link
Contributor

I'm attempting to update nova-laraberg to the new 1.x version. I'm running into a problem where <script src="https://unpkg.com/react-dom@16.8.6/umd/react-dom.production.min.js"></script> is breaking Nova's use of moment-timezone.

I have commented out the other 2 dependencies to make sure this is the actual culprit. Any suggestions as to how to implement it -- is there a no-conflict mode?

Thanks!

@mauricewijnia
Copy link
Member

Hmm it feels strange that react-dom would have an effect on moment-timezone those 2 should be completely independent right?
Anyways, I don't really have any ideas on how to solve this, you got any suggestions on how we can solve this from Laraberg's side?

@mikebronner
Copy link
Contributor Author

mikebronner commented Aug 7, 2019

Not really .... I was thinking that if it conflicts with Laravel Nova, it probably conflicts with other packages or apps out there as well. I am not at all familiar with React, thought perhaps you might know of a way to isolate it more.

I agree, it's definitely strange that it is conflicting with Laravel Nova's DatetimePicker field.

I realize I completely forgot to post the actual error I was getting:

Moment Timezone found America/Los_Angeles from the Intl api, but did not have that data loaded.

This seems to indicate that either React is wiping out moment-timezones data store, or creating a new instance of it? I admit, I'm a bit confused by this issue. :)

@mauricewijnia
Copy link
Member

I'm still having doubts that this is caused by React...
Wordpress uses i18n for internationalisation, so maybe that or some other wordpress package causes these issues?
Maybe disabling React-DOM just causes an error which prevents the wordpress packages from being loaded, which in turn prevents the error you're having from occurring.

I'll have a look at it as well when I can find some time :)

@mikebronner mikebronner changed the title Conflicts caused by react-dom dependency. Conflicts with Laravel Nova's DateTimePicker Aug 7, 2019
@mauricewijnia
Copy link
Member

I think I found the issue, I got nova-gutenberg working with my local laraberg version, and after some trial and error it seems like the moment errors dissappeared after i removed moment from my webpack externals setup. I'll release v1.0.0 today with this removed, and hopefully you'll be able to make the necessary changes then :)

@github-actions
Copy link

github-actions bot commented Jun 8, 2022

This issue has been automatically marked as stale because it has been open for 60 days with no activity.

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

No branches or pull requests

2 participants