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.

Module has no has no default export with ts and rollup

See original GitHub issue
import dayjs from 'dayjs'

compile with rollup , got error `Module

“…/source/node_modules/dayjs/index” has no default export.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

11reactions
Kikisekcommented, Sep 13, 2018

Try import * as dayjs from 'dayjs', it helped me 😃

5reactions
Smirkingcommented, May 1, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

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