ErikGartner / dTree

A library for visualizing data trees with multiple parents, such as family trees. Built on top of D3.
https://treehouse.gartner.io/ErikGartner/58e58be650453b6d49d7
MIT License
509 stars 135 forks source link

Reference error _ is not defined. #144

Open mohankoppuravuri opened 1 year ago

mohankoppuravuri commented 1 year ago

Hello guys. I installed loadash and d3 libraries. Below is the dependenies copied from my package.json file.

 "dependencies": {
    "d3-dtree": "^2.4.1",
    "d3": "^4.5.0",
    "lodash": "^4.0.0"
  }
image

Can you tell me what went wrong with my installation ?

JorbFreire commented 1 year ago

same issue here, did you make it work @mohankoppuravuri ?

shahzodjonweb commented 12 months ago

same issue here, did you make it work @mohankoppuravuri ?

Hi , I have downloaded d3-tree package instead of using npm. I have loaded d3 and loadash as npm package. In my downloaded dTree.js file , I have added : import _ from "lodash"; import * as d3 from "d3"; Then everything worked. Note that d3 should be older version , if no it gives error, mine is "d3": "^5.16.0".