moment.localeData is not a function
programmeranamul opened this issue · 7 comments
I'm facing same issue, have you managed to solve it?
@programmeranamul @mahmodHammad I'm facing the same issue, any clue on how to solve this issue ?
I am also facing the same issue in my Vue JS Project. Does anybody has solved it?
Can you please give me an example of the changes?
based on @programmeranamul opinion, I've changed the moment-hijri.js core file available in node_modules/moment-hijri. I only changed moment to moment/moment.
Here is what I've done : line 12 to 22
`
/* global define */
if (typeof define === 'function' && define.amd) {
define(['moment/moment'], function (moment) {
root.moment = factory(moment)
return root.moment
})
} else if (typeof exports === 'object') {
module.exports = factory(require('moment/moment'))
} else {
root.moment = factory(root.moment)
}
`
based on @programmeranamul opinion, I've changed the moment-hijri.js core file available in node_modules/moment-hijri. I only changed moment to moment/moment. Here is what I've done : line 12 to 22 ` /* global define */
if (typeof define === 'function' && define.amd) { define(['moment/moment'], function (moment) { root.moment = factory(moment) return root.moment }) } else if (typeof exports === 'object') { module.exports = factory(require('moment/moment')) } else { root.moment = factory(root.moment) }
`
can this be turned into a PR so that the issue can be permanently solved? it has been 2 years since the last update of this repo