Accepted answer

If you choose to go down the d3 and jetpack route together, as it seems to be the case by your references to d3v4+jetpack.js, you must not load vanilla d3 in your script.

const d3j = require('d3-jetpack/build/d3v4+jetpack');

The line above does it for me. Note that it exposes d3j instead of d3, so you will of course need to adapt your code to something like:

const x = d3j.scaleLinear();

Hope this helps you!

Related Query