Closed tarlepp closed 4 years ago
Looks like this issue is actually caused by moment itself. See https://github.com/moment/moment/issues/5491
Digging into the source for this lib - it just pulls in the latest minor version of moment, meaning when it is installed it will currently pull the defective version of moment, which is 2.25.0.
it looks like a fix has been released, but ~I imagine ngx-moment needs to upgrade their dependency to pull it in. Once that happens we should be good to go.~ moment is a peer dependency so installing 2.25.1 should fix it. ...doesn't seem to resolve it for me.
I had to npm cache clear --hard
. If that doesn't work then try dumping the node_modules folder.
Still not working with 2.25.1:
WARNING in ./node_modules/moment/src/lib/locale/locales.js
Module not found: Error: Can't resolve './locale' in 'D:\Desarrollo\SendGround\pwa\node_modules\moment\src\lib\locale'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 237:15-23
"export 'duration' was not found in 'moment'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 606:12-18
"export 'isDate' was not found in 'moment'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 68:52-60
"export 'isMoment' was not found in 'moment'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 609:17-25
"export 'isMoment' was not found in 'moment'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 621:15-23
"export 'isMoment' was not found in 'moment'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 621:50-56
"export 'locale' was not found in 'moment'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 451:15-24
"export 'parseZone' was not found in 'moment'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 253:16-37
"export 'relativeTimeThreshold' was not found in 'moment'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 288:15-19
"export 'unix' was not found in 'moment'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 333:25-28
"export 'utc' was not found in 'moment'
ERROR in ./node_modules/ngx-moment/__ivy_ngcc__/fesm2015/ngx-moment.js 333:47-50
"export 'utc' was not found in 'moment'
Also not working dumpling node_modules or running npm cache clear --hard
What does your package.json look like? A workaround I have tested is to just to use moment 2.24.0 alongside ngx-moment.
@nickyg91 yes, it's working with 2.24.0. We are taking about >= 2.25.0
Right. As per the original issue on moment people are still confirming that the issue persists. If you need an immediate workaround you'd have to downgrade moment.
Same problema here. Application with more than 2 thousands users along my country. I had to downgrade to version 2.24.
Fixed with moment version 2.25.3
hmm, don't see that yet in releases - https://github.com/moment/moment/releases
Just tried that 2.25.2 couple of hours ago and problem exists with that.
hmm, don't see that yet in releases - https://github.com/moment/moment/releases
Just tried that 2.25.2 couple of hours ago and problem exists with that.
You need to go to this link: https://www.npmjs.com/package/moment
hmm, don't see that yet in releases - https://github.com/moment/moment/releases Just tried that 2.25.2 couple of hours ago and problem exists with that.
You need to go to this link: https://www.npmjs.com/package/moment
I always check GitHub releases first - which should be the same as npm - or any other package manager.
Just because usually things like update some package manager is done via CI which triggers on those GitHub tags - or that is what I've used and seen used in multiple different project.
Looking at other issues on moment - it looks like this is potentially fixed in 2.25.3? Again - if you are blocked and 2.25.3 does not fix your issue just install 2.24.0 alongside ngx-moment for the workaround.
Yes, fixed with moment v.2.25.3. You can close the issue.
v2.25.3 Fixed it for me
Yeah, I can also confirm that 2.25.3
fixed this issue, closing this one.
Description of the Issue and Steps to Reproduce:
Did you search for duplicate issue? [Yes /
No]After I updated my moment to version
2.25.0
I've followed issues when Angular is compiling;Ensure your issue is isolated to ngx-moment. Issues involving third party tools will be closed unless submitted by the tool's author/maintainer.
Environment:
Please answer the following questions:
moment
version? 2.25.0moment-timezone
? yes, version 0.5.28