I\'ve been trying to invoke D3 within Node.js. I tried firstly to import d3.v2.js from D3\'s website with the script tag, but then read this thread:
I want to run d3
To use with ES6's import instead of require:
import
require
import * as d3 from 'd3';
This is perhaps obvious to any experienced babel/ES6-user, and I know this is an old question, but I came here in an attempt to figure this out. Hope this is helpful for someone.
More on import vs. require is found here.