Moment-timezone: "Moment Timezone requires Moment.js" error when using Node package

Created on 1 May 2020  路  12Comments  路  Source: moment/moment-timezone

Moment-timezone 0.5.23 throws the following error when attempting to use:

Moment Timezone requires Moment.js.

I have attempted to upgrade to the latest package version but it doesn't solve the issue. In researching, I found that it's probably related to https://github.com/moment/moment/issues/5481 since moment is a dependency.

Would it be possible/a good idea to change the moment version in the package.json file to exclude the versions of moment which cause this issue?

Thanks!

Most helpful comment

Broke our page as well:

image

All 12 comments

I have the same issue here.

Broke our page as well:

image

Broke ours as well

Screen Shot 2020-05-01 at 6 23 21 PM

+1

+1

Previous issue #837 fix worked for me.

+1

for now just rollback to 2.24
if you need another package that already depends on 2.25, update package.json's resolutions

  "resolutions": {
    "**/moment": "2.24.0"
  },

Setting moment version to "2.24.0" fixed it for me

Upgrading moment to 2.25.3 fixed it for me. I had the same issue with moment >2.24.0 <=2.25.2 and moment-timezone 0.5.28.

+1锛孖 also encountered the same problem

Fixed since moment 2.25.3 got released

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mj1856 picture mj1856  路  5Comments

palindrom615 picture palindrom615  路  4Comments

edu2004eu picture edu2004eu  路  6Comments

garryyao picture garryyao  路  4Comments

sbrandwoo picture sbrandwoo  路  4Comments