You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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...
Activity
jimaek commentedon Aug 16, 2017
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.
radumas commentedon Aug 16, 2017
Indeed the problem appears to be with unpkg. Now
bundle.jsis struggling to be delivered.How do I change the javascript sources in Dash?
This happens due to plotly/dash-renderer#11
ned2 commentedon Aug 16, 2017
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.
chriddyp commentedon Aug 16, 2017
For now, you can render the files locally without relying on the CDN with
ned2 commentedon Aug 16, 2017
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 settingapp.css.config.serve_locally = Truenow means that Dash can't find the file. As I get this UserWarning:Strangely it's finding local javascript files fine. Perhaps this wants to be a separate issue...
radumas commentedon Aug 16, 2017
Can confirm that
works on heroku as well.
Thanks @chriddyp !
chriddyp commentedon Aug 16, 2017
FYI - The original issue (failures serving react-dom from unpkg cdn) is being tracked here: unpkg/unpkg#54
Merge pull request #114 from plotly/no-events