Replies: 12 comments
-
|
Thanks for reporting this. Would you mind confirming which bundler (and version of it) you are using? I'm guessing Rollup but just want to be sure. The |
Beta Was this translation helpful? Give feedback.
-
|
Yes, I am using rollup and was investigating if there is a way to "handle" the error when the module is missing. I am using 2.28.1 of rollup. Thanks for looking into the issue. I'll see if I can come up with anything. Thanks for the slider. We really like it and beats trying to use a html slider on a svg! |
Beta Was this translation helpful? Give feedback.
-
|
Ah, thanks for the extra detail. What we need is a reliable way of detecting which version of d3 the library sees. It's made a little muddy because someone might be importing all of |
Beta Was this translation helpful? Give feedback.
-
|
I think I may have a fix. It works when I use it locally when using d3 v6. #166 |
Beta Was this translation helpful? Give feedback.
-
|
Merged #166 and published as v1.10.2. Release notes: https://github.com/johnwalley/d3-simple-slider/releases/tag/v1.10.2. Thanks for your help! |
Beta Was this translation helpful? Give feedback.
-
|
I just ran into this same issue even with latest code. In my case I used create-react-app (v4) to generate the initial project, and afterwards installed the d3 dependencies as follows: When I launch using the sample d3-simpler-slider code, I hit that error. Should I downgrade to a different d3v6 version ( i.e. < 6.2.0 which is currently installed? ) Update: I tried using [email protected] and it didn't seem to help. Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Managed to finally workaround by it by downloading the d3-simple-slider source directly and including it in my project, then modifying d3-compat.js as follows: Apparently the event property check is not enough to avoid the warning ( not sure why ) |
Beta Was this translation helpful? Give feedback.
-
|
I am using buble to compile and rollup to bundle. I to get the warning but the code compiles. The code will never hit the part that's generating the warning. It's not ideal but at does work (at least for me). |
Beta Was this translation helpful? Give feedback.
-
|
I'll take another look at the weekend. I imagine using CRA is the most common way people are consuming this library so I'll use that as a base case 👍 @joeycato you can try pinning the d3-simple-slider to an older version which doesn't try to detect d3 v6, e.g. |
Beta Was this translation helpful? Give feedback.
-
|
@johnwalley Good to know, I'll keep that in mind. Thanks for creating this btw, it works great so far! |
Beta Was this translation helpful? Give feedback.
-
|
I'm still searching for a good solution. I can reproduce the problem with a new CRA example which is a nice starting place. I've got an idea which uses dynamic imports but I'm not a fan: #167. |
Beta Was this translation helpful? Give feedback.
-
|
I'm hoping to schedule some time to update this library and revisit existing issues in the near future. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When I try to bundle an application that is using d3 v6 and d3-simple-slider, I get an error:
The import fails because event is not in the d3-selection module (I have installed version 2.0.0)
Beta Was this translation helpful? Give feedback.
All reactions