# D3.layout module import woes

**URL:** <https://talk.observablehq.com/t/d3-layout-module-import-woes/210>\
**Category:** Help\
**Created:** [February 2, 2018, 9:40am UTC](https://talk.observablehq.com/t/d3-layout-module-import-woes/210 "2018-02-02T09:40:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [February 2, 2018, 2:59pm UTC](https://talk.observablehq.com/t/d3-layout-module-import-woes/210/2 "2018-02-02T14:59:15Z")

</div>

If you don’t specify a version range with your `require`, you’ll get the latest version of the `d3` which is 4.13.0 (and very soon [5.0.0](https://github.com/d3/d3/releases/tag/v5.0.0)!). The [phylotree module](https://www.npmjs.com/package/phylotree) appears to require D3 3.x, so try this:

```auto
d3 = {
  const d3 = window.d3 = await require('d3@3');
  await require('phylotree@0.1').catch(() => {});
  return d3;
}

```

(I also removed the use of [wrzd.in](http://wrzd.in) since that doesn’t look necessary for the phylotree module, and it currently appears down.)

---

_[View the full topic](https://talk.observablehq.com/t/d3-layout-module-import-woes/210)._
