I am getting following error: Module \'\".../node_modules/moment/moment\"\' has no exported member \'default\'
when I use
import * as _moment from
I had so much trouble with trying to properly import Moment that I switched to the date-fns library instead.
date-fns takes a somewhat different approach - as the name implies, it's a collection of date functions, rather than a huge 'god object' that does everything.
The additional benefits are that a) you can import just the individual functions that you need, and b) if you import the whole thing, it tree-shakes really well. So you wind up with a much smaller impact on your module size.