Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no default exports in vuedraggable and xlsx.js #136

Open
danielKugler opened this issue Feb 8, 2024 · 3 comments
Open

no default exports in vuedraggable and xlsx.js #136

danielKugler opened this issue Feb 8, 2024 · 3 comments

Comments

@danielKugler
Copy link

While changing to vite with a vue2 project we are now getting errors.

Uncaught SyntaxError: The requested module '/node_modules/vuedraggable/dist/vuedraggable.umd.js?v=ef55e21c' does not provide an export named 'default' (at PanelSetting.vue:2:8)
Uncaught SyntaxError: The requested module '/node_modules/xlsx/xlsx.js?v=ef55e21c' does not provide an export named 'default' (at VueExcelEditor.vue:7:8)

xlsx.js and vuedraggable seem to not provide default exports.
Therefor imports have to be adjusted.

Could you please change the import in PanelSettings.vue

from: import draggable from 'vuedraggable'
to: import * as draggable from 'vuedraggable'

AND in VueExcelEditor.vue

from: import XLSX from 'xlsx'
to: import * as XLSX from 'xlsx'

@cscan
Copy link
Owner

cscan commented Feb 8, 2024 via email

@danielKugler
Copy link
Author

As i said, it is a vue2 project.

@kg-bot
Copy link

kg-bot commented Nov 12, 2024

I have the same issue while trying to use this on Vue2 project with Vite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants