question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

moment 2.23.0 breaks moment-timer

See original GitHub issue

Since moment 2.23.0 there is no timer property on the result of moment.duration(args), which breaks this plugin.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
justbill2020commented, Feb 8, 2021

Hey everyone… I just wanted to let everyone know… this works in the browser correctly using momentjs v 2.29.1, it only didn’t work in nodejs. I did some research and found that I was not loading momentjs properly in nodejs.

We must use require.js and configure the package correctly to use momentjs in node. per the docs: https://momentjscom.readthedocs.io/en/latest/moment/00-use-it/04-require-js/

I’ve updated my forked repo and included the current release of momentjs and requirejs in the /example/vendor folder, I also created a nodejs example to illustrate how it functioned correctly.

If you clone my repo, and run node /example/nodejs/index.js you will see that it functions correctly.

Hope this helps everyone.

1reaction
Kachilerocommented, Jul 26, 2019

I’m on moment 2.24.0 and this is still an issue. Is this repo abandoned?

Read more comments on GitHub >

github_iconTop Results From Across the Web

moment 2.23.0 vulnerabilities
moment is a lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates. Affected versions of this package are vulnerable to ...
Read more >
moment | Yarn - Package Manager
A JavaScript date library for parsing, validating, manipulating, and formatting dates. Project Status. Moment.js is a legacy project, now in maintenance mode.
Read more >
2.23.0 - moment
Parse, validate, manipulate, and display dates. Latest version: 2.29.4, last published: 4 months ago. Start using moment in your project by ...
Read more >
moment.js formats incorrect year after adding 3 days
GGGG is the year of the ISO week and not the actual year: moment.js: Week year, week, and weekday tokens. GGGG: ISO 4...
Read more >
break-timer
107124 / Break-Timer / master ... timer.js. package.json. Dependencies. @react-native-community/slider ... react-moment.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found