score:0
for posterity's sake on this old issue. i found another option for d3@4.13.0
, which is to add this to your package.json
:
"resolutions": {
"d3-selection": "1.3.0"
}
then deleting your yarn.lock
and then yarn install
the project again to help yarn handle the version resolutions.
fyi: my d3
dependencies in my package.json
are (showing that i don't have d3-selection
as a direct dependency):
...
"d3": "4.13.0",
"d3-geo-projection": "2.9.0",
"d3-scale": "1.0.0",
"d3-scale-chromatic": "3.0.0",
...
this seems to mainly be an issue with how yarn handle it's dependency resolution because, as a test, i was able to temporarily switch my project over to npm
and had no issues.
this thread on github lists a few alternative solutions to what i posted above (and worked for me): https://github.com/d3/d3-selection/issues/185
score:1
i encountered this when i was mix using import * as d3 from 'd3';
and individual import { select } from 'd3-selection'
.
i overcome the issue by just using individual import, which i guess is the suggested way of doing things.
score:8
for future reference: i ran into a similar issue and it seems to be a problem between webpack, yarn and d3-transition. the later extends the function of d3-selection, which somehow results in multiple d3-selection versions in the yarn.lock file (as described in this issue).
in my case explicitly adding d3-selection, removing the lock file and then running yarn install
again fixed the issue.
it seems like every update of d3-transition recreates this problem.
Source: stackoverflow.com
Related Query
- D3 transition looping throwing Uncaught TypeError: t.call is not a function
- d3 transition is not a function
- n.call is not a function issue when doing a transition
- "Interpolate" is not a function
- d3.mouse is not a function
- d3js tree.nodes() is not a function
- Uncaught TypeError: xScale.rangeBand is not a function in d3.js
- Uncaught TypeError: t.rgb is not a function
- transitionDuration function does not exist in nvd3.js
- d3.js or rxjs error? this.svg.selectAll(...).data(...).enter is not a function
- d3.select(this) works on mouseover, but not on function called in mouseover
- d3 transition for transform translate not working for DIV
- d3 v6 pointer function not adjusting for scale and translate
- D3 - forEach is not a function when upgrading from v3 to v4
- d3.js t.map is not a function
- d3 and webpack: __WEBPACK_IMPORTED_MODULE_0_d3__.scaleLinear is not a function
- Uncaught TypeError: this.y.rangeBand is not a function after migration to D3 version 4
- d3, Angular 2: node.getBoundingClientRect is not a function
- D3 function to parse the date not working
- Getting TypeError: .selectAll(...).enter is not a function with d3.js
- D3.tip is not a function
- d3 - sunburst - transition given updated data -- trying to animate, not snap
- D3 transition not working
- d3-transition v2: Error: transition 1 not found
- First d3 transition on update inside interval is not transitioning
- D3 TypeError: link.exit is not a function link.exit().remove(); What am I doing wrong?
- SVG textPath not visible after transition on Chrome
- Uncaught TypeError: d3.queue is not a function D3.js
- d3.nest() not a function
- d3.min.js Uncaught TypeError: a.map is not a function
More Query from same tag
- Can d3.js / JavaScript update a text value like in a chart?
- Origin null is not allowed by Access-Control-Allow-Origin.
- Grails error loading big csv file with d3.js
- D3.js Appending line name to it
- Manipulating data prior to display in dimplejs
- Place image on Y-axis labels in Line chart
- d3 map point only drawed in topleft corner
- Converting stack() call from v3 to v4
- D3: Cannot select an item based on its id
- How to determing z-index of element even when they are set to auto
- D3 draw different SVG shapes in one call, no visiblity
- How to fix graph so it doesn't write over itself when resizing
- D3 custom curve: bundle interpolation for areas
- How to find if point is inside polygon in d3.js
- dc.js overlaying 2 charts
- Typescript, D3 and powerBI: How do i get typescript to talk to D3 v4?
- Mobile Responsive Javascript Map
- Cannot find module 'd3-selection', 'd3-shape', 'd3-scale'
- Remove extra datapoints when reaching end of array
- It's possible to perform a selection on a listener, like on("mouseover")
- Ghost line path when zooming and panning a D3 chart
- How to Call a Function From a JSON Array
- Dynamically change color of D3 Node (force directed graph)
- How to generate random colors in an specific range using D3?
- Plot dynamic json data with d3.js
- How do I select multiple text tags and assign different values to them?
- D3 Labels in pie chart being cut off
- D3 error with data file
- D3 events firing on a hidden svg element
- Continuously change the position of range input element on mouse down event (in single steps)