Reputation: 352
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
Upvotes: 5
Views: 16252
Reputation: 2684
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",
Upvotes: 3
Reputation: 56
I resolved this issue by updating tsconfig.ts file to skip lib checks:
{
// ..
"compilerOptions": {
// ..
"useDefineForClassFields": false,
"skipLibCheck": true,
// ..
}
}
Upvotes: 2
Reputation: 69
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.
Upvotes: 4
Reputation: 206
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
Detailed installed instructions can be found here
Upvotes: 14
Reputation: 352
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
Upvotes: 3