New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require/import behaviour is broken as of ^2.5 #5494
Comments
Version ^2.25 maybe ? I'm experiencing the same issue. With the error : |
It is fixed in 2.25.1 |
I just updated to 2.25.1 and the error is still there, so I rolled back to 2.24.0 for now |
@prooli22 I ran into the same problem and rolled back to version Before version 2.25, moment was a function After version 2.24, moment was an object with a default object which contains the version number. So the following error occurred: |
Upgrading to 2.25.2 with |
Is this still an issue with 2.25.3 ? |
@marwahaha seems to be working fine with 2.25.3 |
Please re-open if you still have issues. |
I'm having to introduce a moment adaptor to get round typings incompatibilities (or stupid user error):
I'm using Moment 2.29.1, Typescript 4.4.3 |
Describe the bug
As of v2.5 the require behavior is broken, and functions fail to import.
Please see issue: #5484
To Reproduce
#5484 (comment)
Additional context
For those of us using packages where moment is a dependency, and they've referenced higher versions than exist, this will always break if you're doing a docker build as the package-lock.json's going to be overwritten even if checked in anyway, i.e.
And also:
I think this means you can't override their version settings (or my attempts have failed anyway) and it might mean some file system maniuplation which I really don't want to do.
I appreciate the problem may be amplified for container builds as other uses will revert to 2.4 but because of dependency versioning some people may be blocked.
Yarn's resolution feature would be a workaround but it's not a possibility to switch over without introducing a further 3 headaches (for me anyway)
The text was updated successfully, but these errors were encountered: