title: D3-tip and NPM: "TypeError: m.tip is not a function"
body: <p>I'm writing a React wrapper around D3 and am getting an error while trying to use D3-tip: <code>TypeError: m.tip is not a function</code>. </p>
  
  <p>I've seen similar posts about this (<a href="https://stackoverflow.com/questions/45569419/d3-tip-is-not-a-function-webpack-and-typescript">here</a> and <a href="https://stackoverflow.com/questions/40090730/using-d3-tip-with-npm-uncaught-typeerror-cannot-read-property-node-of-undef">here</a>), as well as <a href="https://github.com/Caged/d3-tip/issues/145" rel="nofollow noreferrer">this issue</a> on the d3-tip GitHub but neither worked in my case. I have used NPM to install D3 4.12.2 and D3-tip 0.7.1, so the version issues mentioned in those links should not apply.</p>
  
  <p>The relevant code looks like this:</p>
  
  <pre><code>import * as d3 from 'd3';
  import * as d3Tip from 'd3-tip';
  
  svg = d3.select('#' + divId)
                      .append('svg')
                      .attr('width', width)
                      .attr('height', height);
  
  g_node = svg.append('g')
                      .attr('id', 'g_node');
  
  var node_circles = g_node.selectAll('circle')
                                  .data(dataset, function(d) { return d.name; });
  
  var tool_tip = d3Tip.tip()
          .attr('class', 'd3-tip')
          .offset([-8, 0]);
  
  svg.call(tool_tip);
  
  node_circles.enter()
                  .append('circle')
                  .attr('cx', function(d) { return projection(d.pos)[0]; })
                  .attr('cy', function(d) { return projection(d.pos)[1]; })
                  .attr('r', '' + NODE_RADIUS + 'px')
                  .attr('fill', 'blue')
                  .on('mouseover', function(d) {
                      tool_tip.show(d);
                  })
                  .on('mouseout', function(d) {
                      tool_tip.hide(d);
                  });
  </code></pre>
  
  <p>Any ideas for how to fix this?</p>