Problems with ngx-quill installation
Asked Answered
I

5

5

Im having this errors while compiling my project

Error: node_modules/ngx-quill/lib/quill-editor.component.d.ts:3:21 - error TS2614: Module '"quill"' has no exported member 'Delta'. Did you mean to use 'import Delta from "quill"' instead?

3 import QuillType, { Delta } from 'quill';


Error: node_modules/quill-delta/dist/Delta.d.ts:1:8 - error TS1259: Module '"C:/ProyectoAgroSintesis/AgroCMS/node_modules/fast-diff/diff"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

1 import diff from 'fast-diff'; ~~~~

node_modules/fast-diff/diff.d.ts:20:1 20 export = diff; ~~~~~~~~~~~~~~ This module is declared with using 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

I dont know how to fix this, I installed quill following quill instructions in npm page

Isotropic answered 9/3, 2022 at 21:35 Comment(0)
D
14

To resolve this error for [email protected] and angular 13.1.2, you need to ensure you install the correct version of @types/quill and quill

  1. @types/quill v1.x -> npm i types/quill@1
  2. quill v1.x -> npm i quill@1

Detailed installed instructions can be found here

Dot answered 15/5, 2022 at 20:42 Comment(2)
thank you, I mas missing the npm i @types/quill@1 that make it work without any other change.Isotropic
thanks ! solved with [email protected] and angular 13.1.xTrifling
C
4

I also got the same issue in angular 16. For me I updated to the latest version of ngx-quill and quill and I needed to install [Yesterday 6:37 PM] Bikash Shah

npm i @types/quill@1

This worked for me.

Cleanly answered 11/6, 2023 at 7:13 Comment(0)
I
3

I dont know why I have this errors but I solve them

For the first error I change the imports in the quill-editor.component.d.ts like this:

import QuillType from 'quill';
import Delta from 'quill';

For the second error I put the flag "allowSyntheticDefaultImports": true, in my tsconfig.json in the compilerOptions

Also I change the version of the ngx-quill, I had the 16.1.2 and I downgrade to the 15.0.0

Isotropic answered 9/3, 2022 at 22:30 Comment(0)
L
2

I was having this same issue with angular version 17.2.1.

After 4 hours of trying different things including attempting to move to summernote, I finally got the app to compile with quill, but only after installing these specific versions of quill, ngx-quill and types:

"ngx-quill": "^25.1.2",
"quill": "^2.0.0-dev.4",
"@types/quill": "^2.0.14",
Ludovika answered 2/4 at 21:27 Comment(2)
This was super annoying but using these versions fixed it for me tooForkey
Is this an issue with the Quill library? I am not using angular, but having the same problem importing quill v2.0.2. I am explicitly not using @types/quill per the updated v2.0+ Quill documentation. :( quilljs.com/docs/upgrading-to-2-0#quillPhotoelasticity
I
1

I resolved this issue by updating tsconfig.ts file to skip lib checks:

{
// ..
"compilerOptions": {
        // ..
        "useDefineForClassFields": false,
        "skipLibCheck": true,
        // ..
    }
 }
Intrados answered 22/3 at 3:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.