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

The requested module '/node_modules/diff-match-patch/index.js?v=1f9f0c93' does not provide an export named 'default' #123

Open
Karsi482 opened this issue Aug 8, 2022 · 3 comments

Comments

@Karsi482
Copy link

Karsi482 commented Aug 8, 2022

Hello I am getting the following error after executing the instruction in my Laravel 9 + Vite + vue3 application

Uncaught SyntaxError: The requested module '/node_modules/diff-match-patch/index.js?v=1f9f0c93' does not provide an export named 'default' (at codemirror-editor-vue3.es.js?v=1f9f0c93:25:8)

my app.js
image
and component
image

How can I solve this problem?

@codeperl
Copy link

codeperl commented Nov 13, 2022

I am facing kind of same problem. My error message is: "Error: 'default' is not exported by..." for "codemirror-editor-vue3". "codemirror-editor-vue3" is inside node_modules and installed as a dependency of vue-laravel-file-manager. I amusing vuejs3 and vite.

Did you find any solution for this?

@alexusmai I can't thank you enough for writing this beautiful piece of software. I'll be glad if you can help regarding this.

The exact error in developer plugin is like this:

Mozilla Firefox:
"Uncaught SyntaxError: ambiguous indirect export: default [codemirror-editor-vue3.es.js:25:7](https://www.freemarket.com:4431/node_modules/codemirror-editor-vue3/dist/codemirror-editor-vue3.es.js?v=82a63921)"

Chrome in Ubuntu:
"Uncaught SyntaxError: The requested module '/node_modules/diff-match-patch/index.js?v=82a63921' does not provide an export named 'default' (at codemirror-editor-vue3.es.js?v=82a63921:25:8)"

and this is the line it indicates:
"import DiffMatchPatch from "/node_modules/diff-match-patch/index.js?v=82a63921";"

@codeperl
Copy link

If it helps someone. I solved this issue! I added configuration to vite.config.js

optimizeDeps: {
        include: ['codemirror-editor-vue3']
    },

@yousof-jfri
Copy link

thanks a lot @codeperl

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