The requested module 'sweetalert2/dist/sweetalert2.js' does not provide an export named 'default'
See original GitHub issueSeems like version 2 does not provide a default export. Installed latest version using npm install, as provided on npm.
Just like you provided on npm, I did this:
import Swal from 'sweetalert2/dist/sweetalert2.js'
Title is the error I am getting when importing Swal as module. It works if Import it using script tag though. But that’s not what I want.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
The requested module '' does not provide an export named ...
When I try adding my own export in TableCsv.js it says A module cannot have multiple default exports.ts(2528). Here is my code. main.js...
Read more >The requested module '__' does not provide an export named ...
Note: while this fresh project shows The requested module '@sveltejs/adapter-static' does not provide an export named 'default' - in my original project ...
Read more >export - JavaScript - MDN Web Docs
This re-exports all named exports from mod as the named exports of the current module, but the default export of mod is not...
Read more >the requested module does not provide an export named
The reason it didn't work is that Vue provides a named export, whereas you are trying to import it as though it had...
Read more >Snowpack - The requested module '/web_modules/recoil.js ...
Uncaught SyntaxError: The requested module '/web_modules/recoil.js' does not provide an export named 'RecoilRoot'. I will talk about how to ...
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 Free
Top 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
export ‘default’ (imported as ‘Swal’) was not found in ‘sweetalert2’ (module has no exports)
🎉 This issue has been resolved in version 11.3.10 🎉
The release is available on:
Your semantic-release bot 📦🚀