Module has no has no default export with ts and rollup
See original GitHub issueimport dayjs from 'dayjs'
compile with rollup , got error `Module
“…/source/node_modules/dayjs/index” has no default export.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:13 (2 by maintainers)
Top Results From Across the Web
error TS1192: Module '" A.module"' has no default export
This was a simple error. It occurred due to the missing {} around the module name in the import statement itself.
Read more >Module has no default export Error in TypeScript
The "Module has no default export" error occurs when we try to import as default from a module that doesn't have a default...
Read more >ts-transform-default-export
Whether to throw when there are named exports in the module along with the default one. This is important because when a default...
Read more >react-typescript module build : has no default export
I'm trying to build a react-typescript module. But whenever I try to build that, it gives me : (plugin rpt2) Error: /home/maifee/Desktop/react- ...
Read more >rollup.js
A config file is an ES module that exports a default object with the desired ... --no-indent Don't indent result --interop <type> Handle...
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
Try
import * as dayjs from 'dayjs'
, it helped me 😃Looks like this was reverted again here https://github.com/iamkun/dayjs/pull/476, so it’s broken again as of 1.8.4 for rollup and things that use rollup, ng-packagr etc