Problem with dependency on @types/quill
See original GitHub issueWhen I install it with yarn add react-quill
and import it in a typescript project with
import ReactQuill from 'react-quill';
or import * as ReactQuill from 'react-quill';
I get the following error:
Namespace ‘“…/node_modules/@types/quill/index”’ has no exported member ‘DeltaStatic’.
react-quill 1.3.1 has dependencies on "quill": "^1.2.6"
and "@types/quill": "*"
. A few days ago new type definitions for quill 2.0.0 have been released, so "@types/quill": "*"
resolves to @types/quill 2.0.0 now which seems to be incompatible with quill 1.x.
I managed to fix it by putting
"resolutions": {
"@types/quill": "1.3.6"
},
in our package.json to tell yarn which type definitions to pull.
I think react-quill should specify major/minor version for the dependency on @types/quill to match the dependency on quill to avoid this problem.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:18
- Comments:8 (1 by maintainers)
I spent a lot of time for this issue. This problem is related to incompatible versions of packages for quill. So, my solution:
“@types/quill”: “^1.3.9” if you use TypeScript (and “esModuleInterop”: true in tsconfig.json) “quill”: “^1.3.6”, “quill-delta”: “3.4.3”, “react-quill”: “1.2.7”
npm i -DE @types/quill@1.3.6