Skip to content

Error loading react-dom@15.4.2 #114

Closed

Description

@radumas

I've deployed a Dash app to Heroku and the page was loading fine on my development computer, but my colleagues ran into errors loading the page. The error I'm getting in the console at the moment is:
mighty-savannah-97969.herokuapp.com/:24 GET https://unpkg.com/react-dom@15.4.2/dist/react-dom.min.js
Playing with URLs at unpkg, I see that 15.4.1 and 15.5.1 exist.

Activity

  1. jimaek commented on Aug 16, 2017

    @jimaek

    You can use jsDelivr instead https://cdn.jsdelivr.net/npm/react-dom@15.4.2/dist/react-dom.min.js

    It's more reliable and built to be production ready, without such problems.

  2. radumas commented on Aug 16, 2017

    @radumas
    Author

    Indeed the problem appears to be with unpkg. Now bundle.js is struggling to be delivered.

    How do I change the javascript sources in Dash?

    This happens due to plotly/dash-renderer#11

  3. ned2 commented on Aug 16, 2017

    @ned2
    Contributor

    The react javascript files are included within the dash-renderer package rather than dash itself. I've submitted this PR plotly/dash-renderer#12 to update the react files to 15.6.1.

    If you look at the changes you'll see how to point to the javascript file you want.

  4. chriddyp commented on Aug 16, 2017

    @chriddyp
    Member

    For now, you can render the files locally without relying on the CDN with

    app.css.config.serve_locally = True
    app.scripts.config.serve_locally = True
    
  5. ned2 commented on Aug 16, 2017

    @ned2
    Contributor

    Ah, so now I see what is meant by local CSS/JS is not supported. I've just been adding them with eg app.css.append_css({"external_url": '/static/css/foo.css'}) which has been working fine, however setting app.css.config.serve_locally = True now means that Dash can't find the file. As I get this UserWarning:

    A local version of /static/css/foo.css is not available
    

    Strangely it's finding local javascript files fine. Perhaps this wants to be a separate issue...

  6. radumas commented on Aug 16, 2017

    @radumas
    Author

    Can confirm that

    app.css.config.serve_locally = True
    app.scripts.config.serve_locally = True

    works on heroku as well.

    Thanks @chriddyp !

  7. chriddyp commented on Aug 16, 2017

    @chriddyp
    Member

    FYI - The original issue (failures serving react-dom from unpkg cdn) is being tracked here: unpkg/unpkg#54

  8. added a commit that references this issue on Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions