Skip to content

Theme code clashes with requirejs #93

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

Closed
choldgraf opened this issue Feb 20, 2020 · 3 comments
Closed

Theme code clashes with requirejs #93

choldgraf opened this issue Feb 20, 2020 · 3 comments

Comments

@choldgraf
Copy link
Collaborator

I am not sure what exactly is causing this, but I believe that the Bootstrap javascript clashes with RequireJS when the latter is loaded. When I try to use ipywidgets (which loads requirejs) with this theme, I get an error like this:

Uncaught Error: Mismatched anonymous define() module:

and a bunch of text after.

This will be an issue for anybody that uses the ipywidgets ecosystem, which necessitates that RequireJS is loaded. Is there either a technical fix around this, or a way that users should load requirejs such that it doesn't clash with bootstrap?

@choldgraf
Copy link
Collaborator Author

also opened up jupyter-widgets/ipywidgets#2787 to see if that's the issue

@jorisvandenbossche
Copy link
Member

I ran into this before (for pandas, #25) with nbsphinx, which includes requirejs: spatialaudio/nbsphinx#327 (comment)

For pandas I solved this by not loading requirejs (via an nbsphinx option): pandas-dev/pandas#28940

But, an actual solution would of course be to let them play nicely together, for which I then opened #30. At the time I did some googling around it, and there are workarounds suggested, but none was directly obvious to me (with my limited js knowledge) so that I didn't further look into it.

@choldgraf
Copy link
Collaborator Author

choldgraf commented Feb 20, 2020

Oops - OK I'm gonna close this as a dupe because you already have #30...but I agree this is important if we want to support the pydata ecosystem, which is a heavy-ish user of Jupyter / widgets / etc.

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

2 participants