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 default export

See original GitHub issue

Version

16.6.0 and later

Reproduction link

github.com

Steps to reproduce

npm install
npm run dev

What is expected?

No errors

What is actually happening?

Module ‘“…Page.vue”’ has no default export


Maybe it has something to do with shims-vue.d.ts file content. To be honest I don’t quite understand things like this yet.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kkueglercommented, Oct 31, 2021

I could not get this to work with a tsconfig that worked well in other contexts. There might be an order problem, as any changes during Webpack watch (e.g. changing some text in the .vue file) make Webpack work after it initially reported an error.

Updating ts-loader to 9.2.6 properly resolved this for me. In fact any of the 9.x versions seems to work.

1reaction
shameleocommented, Oct 11, 2021

@LinusBorg, I didn’t get it. Page.vue is missing in tsconfig include? Shouldn’t appendTsSuffixTo: [/\.vue$/] line in ts-loader options fix it? Anyway, I tried my best to include this file. Like: "include": ["src/**/*.ts", "src/**/*.vue"] "include": ["src/**/*.+(ts,vue)"] "include": ["src/**/*.{ts,vue}"] "files": ["src/index.ts", "src/Page.vue", "src/shims-vue.d.ts"] None of this works And it worked with previous versions of vue-loader, after all.

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 '"x"' has no default export. even with esModuleInterop ...
Module '"x"' has no default export. even with esModuleInterop and/or allowSyntheticDefaultImports enabled #47367.
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 default export Error in TypeScript | bobbyhadz
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 >
Resolve default import when .d.ts has no default export
If a d.ts file is a module (es6), we should resolve JavaScript default imports to the file instead of showing the "Missing default...
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