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

Panel issue with loading requirejs #2568

Open
govinda18 opened this issue Jul 23, 2021 · 1 comment
Open

Panel issue with loading requirejs #2568

govinda18 opened this issue Jul 23, 2021 · 1 comment
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@govinda18
Copy link
Contributor

govinda18 commented Jul 23, 2021

ALL software version info

Panel 0.12
Python 2
Jupyter Lab 3

Description of expected behavior and the observed behavior

When trying to load requirejs with panel, it is not loaded correctly.

Complete, minimal, self-contained example code that reproduces the issue

    pn.extension(
        js_files={
            "require": "https://cdn/common/requirejs/2.3.4/require.js",
        }
    )

While this does not throw any errors, when we try window.require.config, it is undefined. This suggests that require is being messed up or overridden somehow.

When I try loading it as an HTML block,

%%HTML
<script src="https://cdn/common/requirejs/2.3.4/require.js"></script>

then on running

import panel as pn
pn.extension()

it throws the error http://requirejs.org/docs/errors.html#mismatch.

Stack traceback and/or browser JavaScript console output

The stack trace is pretty large, This is the same trace which is reported in #1077

@philippjfr philippjfr added this to the Wishlist milestone Jul 26, 2021
@philippjfr
Copy link
Member

I'll be quite honest and say this is not a high priority. require.js is a complex library which has caused me a ton of headaches over the years, particularly when added to notebooks. I'd be very happy to accept a patch that fixes this but I'm unlikely to have time to chase this down in the near future.

@MarcSkovMadsen MarcSkovMadsen added the type: bug Something isn't correct or isn't working label Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

3 participants