Module has no default export
See original GitHub issueVersion
16.6.0 and later
Reproduction link
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:
- Created 2 years ago
- Comments:6 (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 '"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 >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
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.
@LinusBorg, I didn’t get it.
Page.vue
is missing in tsconfig include? Shouldn’tappendTsSuffixTo: [/\.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 ofvue-loader
, after all.