Uncaught ReferenceError: moment is not defined
See original GitHub issueDescribe 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:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
😕 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 🙂