-
Notifications
You must be signed in to change notification settings - Fork 9
tr.on is not a function and failed Plotly.js webpack builds #5
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
Hey @aferriss! The examples are indeed out of date for Do you have any more information about the transforms and libraries that you're using? It might also be worth trying the just-published |
I am having the same issue with I am trying to use ify-loader to bundle plotly.js. Any idea as to what may be causing this? |
@pfgherardini if you share the relevant parts of your webpack config I may be able to triage in a bit :) |
Thanks! My webpack config looks like this
I have installed plotly.js via a standard
and I am trying to require it in my code with
The error I am getting is
|
@hughsk I'm getting roughly the same error as @pfgherardini Here's my webpack config file (rules only method for applying module rules):
When running 'webpack' from the command line to transpile code, I get the following error:
|
I was experiencing the same errors given above. I submitted a PR to show a temporary fix that has unblocked my local development, but I would like someone more knowledgeable to help identify the best long-term solution. |
I am having the same problem. Also trying to bundle Plotly.js with webpack2. I was using webpack1 with plotly.js without any browserify or ify-loader and everything was working fine. Upgrading to webpack2 has lead me eventually to this issue. |
Just wondering if there have been any progress in this? I am having the same issue as well. Did anyone find a workaround? |
If you only want to use plotly.js, then there are other ways to include it into a project (e.g. via index.html with the minified version). |
Indeed. I ended up just pulling plotly from their CDN using a <script> tag in my index.html |
We apparently need to this to work with https://github.com/stackgl/glslify. Tried the forked version from PR but not working :/ Trying alternatives like webpack's transform-loader, but that is a bit too much.. |
|
https://plot.ly/javascript/modularizing-monolithic-javascript-projects/
I also had to remove these lines from my webpack.config
|
I need the ify-loader because I use WebGL parts of plotly.js. @fidoogle Your imports work because you do not need glslify! from https://github.com/plotly/plotly.js/
|
Any updates on this? I am also experiencing the same issues and need to pull Plotly from the CDN. |
Hi All. Plotly is looking for someone to fix this for us. Our team is flat-out busy on other things. Compensation should not be an issue and we can work that out off issue. If you know someone who is up for the task email me at [email protected] . I am starting the search now and will update this issue once we have started. My plan is to get this solved ASAP. |
I have renamed the issue to more closely reflect the issues folks are seeing. |
Here's a repo that reproduces the issue somewhat more minimally: |
Possibly related? glslify/glslify#74 (comment) |
Fix on the way. Likely to land on in a couple days #9 |
To recap from #9: The issue is that glslify requires opts._flags to be truthy in order for it to function as a transform. You might simply be able to specify With that change, Plotly, for one, seems to webpack just fine (for the people who've tried it so far). |
closed by #9 |
Published as v1.1.0 |
Now that the fix has been published, I've turned my issue-reproduction repo into a howto repo: https://github.com/rreusser/plotly-webpack |
I tried the examples in the readme but ended up with a number of errors from webpack. Notably, webpack wants the '-loader' extension on ify, and it complains about there not being any postLoaders in the api.
This silences those two at least, but then it fails to build on line 64 of index.js with
tr.on is not a function....
The text was updated successfully, but these errors were encountered: