Skip to content

cannot import external libraries #42

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
qubolino opened this issue Nov 30, 2018 · 3 comments
Closed

cannot import external libraries #42

qubolino opened this issue Nov 30, 2018 · 3 comments

Comments

@qubolino
Copy link

i am confronted to an unsolved problem when I want to import external react libs (e.g. material-ui among others). it works well with npm run start (or webpack-serve ./webpack.serve.config.js -hot) but not with npm run build:all (or venv/bin/python usage.py) as it cannot find _react.default.createContext();.

debugging the webpack-serve version (which works) i can see that the function is in react.development.js:1266

while with venv/bin/python usage.py i have the following stacktrace:

    at eval (FormControlContext.js?f516:15)
    at Object../node_modules/@material-ui/core/FormControl/FormControlContext.js (enter_triggered_text_input.dev.js?v=0.0.1&m=1543579949:241)
    at __webpack_require__ (enter_triggered_text_input.dev.js?v=0.0.1&m=1543579949:21)
    at eval (InputBase.js?f12e:34)
    at Object../node_modules/@material-ui/core/InputBase/InputBase.js (enter_triggered_text_input.dev.js?v=0.0.1&m=1543579949:301)
    at __webpack_require__ (enter_triggered_text_input.dev.js?v=0.0.1&m=1543579949:21)
    at eval (index.js?26dc:15)
    at Object../node_modules/@material-ui/core/InputBase/index.js (enter_triggered_text_input.dev.js?v=0.0.1&m=1543579949:325)
    at __webpack_require__ (enter_triggered_text_input.dev.js?v=0.0.1&m=1543579949:21)
    at eval (Input.js?3722:22)

Originally posted by @qubolino in https://github.com/plotly/dash-docs/issues/194#issuecomment-443241827

@T4rk1n
Copy link
Contributor

T4rk1n commented Nov 30, 2018

Material-ui only works with react 16, we are still on react 15. We are upgrading it for dash 1.0.0:
plotly/dash#469

@qubolino
Copy link
Author

qubolino commented Nov 30, 2018

thank you for your answer. i understand better now.

do you have an approximate ETA for dash 1.0.0? or an update allowing dash_renderer._set_react_version('16.3.3')

@superior57
Copy link

Not good

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

3 participants