plugin(moment): Module "moment" has no default export.
See original GitHub issueBug Report
Using moment 2.24.0 I get a typescript error:
ERROR in node_modules/@fullcalendar/moment/main.d.ts(2,12): error TS1192: Module '"***/node_modules/moment/moment"' has no default export.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Importing moment into TypeScript project - Stack Overflow
@Ozrix No it doesn't. It means that none of the exports are defined as default, so you need to tell it what you...
Read more >error TS1192: Module has no default export [Solved] - SPGuides
In this reactjs tutorial, we will discuss how to fix an error, error TS1192: Module has no default export. The solution will fix...
Read more >Module has no exported member error in TypeScript
The error "Module has no exported member" occurs when we try to import a member that doesn't exist in the specified module. To...
Read more >TSConfig Option: allowSyntheticDefaultImports - TypeScript
This option brings the behavior of TypeScript in-line with Babel, where extra code is emitted to make using a default export of a...
Read more >Docs - Moment.js
Note: From version 2.9.0 moment exports itself as an anonymous module, so if you're using only the core (no locales / plugins), then...
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
In order to get moment to work in an ES6 module setup, with typescript at least, you need to set
allowSyntheticDefaultImports
. see: https://github.com/moment/moment/issues/4397#issuecomment-358218964Can you try that?
If that’s your problem, I will modify the docs to nudge people to do this
This was fixed in 4.3.0 though please start using 4.3.1 Releases: https://github.com/fullcalendar/fullcalendar/releases