4

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

Chris
  • 322
  • 6
  • 19

3 Answers3

14

To resolve this error for ngx-quill@16.2.1 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

Rufaro Muchedzi
  • 206
  • 2
  • 4
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

Chris
  • 322
  • 6
  • 19
3

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.