primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.01k stars 1.2k forks source link

Editor: Uncaught (in promise) TypeError: module is not a constructor #3971

Open medusiora opened 1 year ago

medusiora commented 1 year ago

Describe the bug

Can not load quill module in dev mode, But it works on production mode.

Error message image image

dependencies

...
"nuxt": "^3.5.0",
...

devDependencies

...
"unplugin-vue-components": "^0.24.0",
"primeicons": "^6.0.1",
"primevue": "^3.18.1",
"quill": "^1.3.7",
...

Node.js version v18.16.0

Reproducer

Nuxt 3

PrimeVue version

3.29.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Nuxt

Browser(s)

Chrome

Steps to reproduce the behavior

Error when init Editor component

Expected behavior

No response

jeverduzco commented 1 year ago

I have the same problem.

Screen Shot 2023-05-19 at 3 43 34 p m

Reproduction link: https://stackblitz.com/edit/nuxt-starter-u1qmpk

michastubi commented 1 year ago

I have exacly the same error, with an identical configuration.

rkelly90 commented 1 year ago

same

brianmhlanga commented 1 year ago

Having the same issue, anyone with a workaround

chris-pynegar commented 1 year ago

I worked around this by adding the following import to primevue.ts:

import Quill from 'quill'

thewebdevelopers commented 1 year ago

I worked around this by adding the following import to primevue.ts:

import Quill from 'quill'

Can confirm, adding this to my primevue Nuxt plugin fixes the Editor component. Thanks @chris-pynegar

brianmhlanga commented 1 year ago

Thanks for the work around @chris-pynegar

adiramardiani commented 1 year ago

any update on this issue @mertsincan ? for now I disable unstyled, and editor workswell <Editor v-model="value" editorStyle="height: 320px" :unstyled="false" />

but yes, we need editor on unstyle too, I think on documentation need to show code sample to work on all available icon/toolbar from this editor icon if use unstyle is enable

I think this issue must move to another version greater than 3.31 because this version is released

Dubemtopsite commented 1 year ago

import Quill from 'quill'

Having same issue and have tried this but stil not working

ethanolle commented 1 year ago

Thanks @chris-pynegar

cberthiaume commented 1 year ago

Same issue here.

Kelileis commented 1 year ago

I worked around this by adding the following import to primevue.ts:

import Quill from 'quill'

Thanks!

brianmhlanga commented 12 months ago

@Dubemtopsite try doing this if the import only is not working

import Quill from 'quill'

export default defineNuxtPlugin((nuxtApp) => { nuxtApp.vueApp.use(Quill); )} you will get an error, then you remove the export. It works for me.

xscasnya commented 11 months ago

I am having the same issue, any update here ?

Dubemtopsite commented 11 months ago

@Dubemtopsite try doing this if the import only is not working

import Quill from 'quill'

export default defineNuxtPlugin((nuxtApp) => { nuxtApp.vueApp.use(Quill); )} you will get an error, then you remove the export. It works for me.

Thanks for the reply but I have already moved on with CKeditor

krishnasinghrathore commented 11 months ago

Hi,

I was facing same issue for a long time, now having following solution which is working as normal Quill editor.

in Githubissues.

  • Githubissues is a development platform for aggregating issues.