I am currently converting my project from ES5 to ES6, but I am running into an issue with MomentJS (version 2.18.1
). The problem is that I have a few variables that
I got Error message like this
Cannot invoke an expression whose type lacks a call signature. Type 'typeof moment' has no compatible call signatures.
My issue was importing with alias
import * as momentns from 'moment';
I changed this to
import moment from 'moment';
solved for me in angular 8(TypeScript 2.4)