d3-selection dependency version issue with es6
See original GitHub issueIn an effort to try and fix #1822 locally, I did an npm install --save d3-collection
which installed v1.0.7.
This stopped the server from erroring out but instead I get this in the console:
Uncaught SyntaxError: The requested module './../../../d3-selection/src/index.js' does not provide an export named 'event'
from d3compat.js:1
.
Looking at the installed version of d3-selection it’s v2.0.0 where the event
export seems to be gone.
Downgrading with npm install --save d3-selection@1.4.1
, event
is available but it fails with Uncaught SyntaxError: The requested module './../../../d3-selection/src/index.js' does not provide an export named 'pointer'
on the same line, which seems to be an addition of v2.0.0.
Not sure how this dep should be rectified.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Thanks for analyzing possible approaches. I would like to add the following constraints:
@nomego, you have already analyzed it quite beautifully. Would you work on a PR where I can contribute as needed?
Yes of course it should work dynamically like today, where the dist version adapts dynamically to d3@5/d3@6. You’ve made an interesting built system where I assume it builds with @6 and fails for all things @5, but does so gracefully and converts d3 imports to d3 global references, causing it to “just work” in an @5 settings; clever. 😃
I made a PR for an example approach which needs some discussion and review in #1824, let me know what you think.