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.

Uncaught ReferenceError: moment is not defined

See original GitHub issue

Describe the bug Upon opening page containing Cron with antd and react installed in my project I get the error Uncaught ReferenceError: moment is not defined

To Reproduce Install antd yarn add antd Install react-js-cron yarn add react-js-cron

Serve project

I have added Cron for testing using

<Cron value='30 5 * * 1,6' setValue={(e: string) => { console.log(e); }} />

Without that Cron tag the page can load fine.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tgb20commented, Jan 5, 2021

Thanks for the offer, I actually just fixed it reading through the build files. We cull parts of packages that we are not actively using to reduce the overall size, moment was in that list. Facepalm.

0reactions
xrutayisirecommented, Jan 5, 2021

😕 Hum, it could be the way you are handling your build or something on your side.

Since it’s not coming from “react-js-cron” I will close this issue here, but I would be happy to help you if you create a stack overflow with your problem with antd. Don’t hesitate to comment here with the link 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReferenceError: moment is not defined in JavaScript
To solve the "ReferenceError: moment is not defined" error in Node.js, make sure to install and import the moment package before using it....
Read more >
"moment is not defined" using moment.js - Stack Overflow
it returns " moment not defined. " referring to .format("dddd, MMMM Do YYYY, h:mm:ss p");. I've read the documentation, and everything looks ...
Read more >
"Uncaught ReferenceError: moment is not defined" using NPM
I installed Moment. js using npm: npm install moment . I'd now like to compile it using npm run dev to replace a...
Read more >
ReferenceError: moment is not defined · Issue #4572 - GitHub
I've use the latest version of moment js and include the minified js at the top of my script. Most of the time...
Read more >
Uncaught ReferenceError: moment is not defined
Hi! After updating to EA 2.3.5 I'm getting errors in the console like the ones below. The interesting thing is that it only...
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