-
-
Notifications
You must be signed in to change notification settings - Fork 78
Uncaught TypeError: Cannot read property 'document' of undefined in angular 8 #89
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
Comments
sorry, i solve the problem by using the solved question #75 |
but is there a posiblity to use |
My workaround is the following:
|
@marrrcin Thanks, this worked for me but only using plotly-latest.js (minified or prod). Using version 1.5.0 gave me this nonsense error: "Invalid plotly.js version. Please, use any version above 1.40.0" |
I am getting a similar problem when running jest/enzyme tests on a component that imports plotly-react component. I think the root cause is the same. Currently using plotly.js version 1.53.0. I tried upgrading plotly.js version to 2 and it solved the problem but wondering if there is a workaround without doing the upgrade just for being able to run the tests. Thanks. |
Hello, @ASA018. This usually happens when Angular minifies the plotly.js code. Have you tried adding it via |
Uh oh!
There was an error while loading. Please reload this page.
i am followed the quick start to use plotly in angular 8.1.3,
my package file content is:
in app module
then i go an error in chrome
and the code in 24874 is
var d3_document = this.document;
The text was updated successfully, but these errors were encountered: