import moment from "moment"; import "moment-duration-format"; code example Example: import * as moment from 'moment'; npm install moment-strftime