vite: No matching export for import typescript interface
Describe the bug
Uncaught SyntaxError: The requested module ‘/app.ts’ does not provide an export named ‘Test’
Reproduction
https://github.com/lake2/vite_bug
System Info
vite
version: 2- Operating System: mac
- Node version: v15.5.0
- Package manager (npm/yarn/pnpm) and version: npm 6.14.11
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (5 by maintainers)
b.js It can be quoted like this
There is a know issue in Vue with type imports, it should work if you use the
import type
form@pingustar let’s avoid commenting on old issues, your question may end up being ignored. Please start a GitHub Discussion or join the chat at Vite Land to ask questions.
Sorry, for asking again… I seem to do something wrong.
I have a
types.ts
fileand in my component
Which results in the following error logged to the browser console:
Uncaught SyntaxError: The requested module '/src/types.ts?t=1616447029056' does not provide an export named 'User'
What am I missing?