Importing d3 to ionic2

I’m having trouble importing d3 to ionic2. I included it using:

npm install d3

The d3 module is in the node_modules directory. I try to import it with:

import * as d3 from 'd3';

But this fails not being able to find the d3 package. Some answers on stackoverflow are not so helpful as they are quite vague or incomplete.

try to change fullpath at import

I will be adding some d3 to an ng2 project I’m working on, but don’t have experience yet. But I am planning to use ng2d3, and you may want to look into that.