hanhdt / vue-trix

Trix text editor component for Vue.js
https://nicedoc.io/hanhdt/vue-trix
MIT License
238 stars 36 forks source link

not working with vue3 #382

Open RHRiday opened 1 year ago

RHRiday commented 1 year ago

Displays the following error on npm run dev command

X [ERROR] No matching export in "node_modules/vue/dist/vue.runtime.esm-bundler.js" for import "default"

    node_modules/vue-trix/dist/vue-trix.esm.js:1:7:
      1 │ import Vue from 'vue';
        ╵        ~~~

E:\Web practice\resume-builder\node_modules\esbuild\lib\main.js:1566
  let error = new Error(`${text}${summary}`);
              ^

Error: Build failed with 1 error:
node_modules/vue-trix/dist/vue-trix.esm.js:1:7: ERROR: No matching export in "node_modules/vue/dist/vue.runtime.esm-bundler.js" for import "default"
    at failureErrorWithLog (E:\Web practice\resume-builder\node_modules\esbuild\lib\main.js:1566:15)
    at E:\Web practice\resume-builder\node_modules\esbuild\lib\main.js:1024:28
    at runOnEndCallbacks (E:\Web practice\resume-builder\node_modules\esbuild\lib\main.js:1438:61)
    at buildResponseToResult (E:\Web practice\resume-builder\node_modules\esbuild\lib\main.js:1022:7)
    at E:\Web practice\resume-builder\node_modules\esbuild\lib\main.js:1134:14
    at responseCallbacks.<computed> (E:\Web practice\resume-builder\node_modules\esbuild\lib\main.js:671:9)
    at handleIncomingPacket (E:\Web practice\resume-builder\node_modules\esbuild\lib\main.js:726:9)
    at Socket.readFromStdout (E:\Web practice\resume-builder\node_modules\esbuild\lib\main.js:647:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12) {
  errors: [
    {
      detail: undefined,
      id: '',
      location: {
        column: 7,
        file: 'node_modules/vue-trix/dist/vue-trix.esm.js',
        length: 3,
        line: 1,
        lineText: "import Vue from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "node_modules/vue/dist/vue.runtime.esm-bundler.js" for import "default"'
    }
  ],
  warnings: []
}
ycrepeau commented 1 year ago

Same error for me (6 months later)

knubbe82 commented 1 year ago

Same error

caspii commented 11 months ago

Same error. Is this project dead?

hanhdt commented 11 months ago

@caspii Sorry, I have been busy recently so don't have time to take a look at the Vue3 support. I believe that Vue3 has another mechanism for exporting the module.