tslib does not provide an export named 'default'
See original GitHub issueI would have opened this as a bug report but unfortunately I have been so far unable to construct a reproduction outside of the context of my project. I am opening this issue to see if anything has either encountered the same problem or would have an idea on how to narrow down the source to provide a reproduction.
I am getting the following error in the browser console:
Uncaught SyntaxError: The requested module '/node_modules/tslib/tslib.js?v=41e18f12' does not provide an export named 'default'
I have been using Vite 2 on this project from the start and have had no issues, then today, after restarting the server, I got this (completely breaking the application).
Any help would be much appreciated!
Additional information:
- Vite version: 2.0.0-beta.30
- tslib version: 1.14.1
- Content of
/node_modules/tslib/tslib.js
: https://gist.github.com/hmaurer/e101d1f7263c2e5dd0219850f53bdd03#file-tslib-js - Output of
npm ls tslib
: https://gist.github.com/hmaurer/e101d1f7263c2e5dd0219850f53bdd03#file-gistfile1-txt
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Requested module does not provide export named 'default'
To solve the error "The requested module does not provide an export named default", use the `default` keyword when exporting a value from...
Read more >The requested module does not provide an export named
I'm getting an error when I import the transpiled typescript file in a html script tag. <script> var handlers = {} </ ...
Read more >does not provide an export named 'default' vite - You.com
The thing you want to do is import vue but it doesnot have a default export function or either the default thing to...
Read more >TSConfig Option: esModuleInterop - TypeScript
By default (with esModuleInterop false or not set) TypeScript treats CommonJS/AMD/UMD modules similar to ES6 modules. In doing this, there are two parts...
Read more >How to Solve does not provide an export named 'default'
To solve the error 'does not provide an export name default' in JavaScript, use the default keyword to make it the default export...
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
This is a bug in tslib. Its
exports
field points to an ESM file which in turn imports a UMD file…Workaround:
This issue has been locked since it has been closed for more than 14 days.
If you have found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Vite version. If you have any other comments you should join the chat at Vite Land or create a new discussion.