question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with dependency on @types/quill

See original GitHub issue

When 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:closed
  • Created 5 years ago
  • Reactions:18
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Bielykh-Artemcommented, Nov 27, 2018

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”

1reaction
jordananderscommented, Nov 20, 2018

npm i -DE @types/quill@1.3.6

Read more comments on GitHub >

github_iconTop Results From Across the Web

@types/quill - npm
@types/quill. TypeScript icon, indicating that this package has built-in type declarations · Readme · Code Beta · 2 Dependencies · 115 Dependents ...
Read more >
@types/quill - NPM Package Overview - Socket
Start using Socket to analyze @types/quill and its 2 dependencies to secure your app from supply chain attacks.
Read more >
Problems with ngx-quill installation - Stack Overflow
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.
Read more >
@types/quill vulnerabilities | Snyk
version published direct vulnerabilities 2.0.9 7 Jul, 2021 0. C. 0. H. 0. M. 0. L 2.0.8 27 May, 2021 0. C. 0. H. 0....
Read more >
Angular rich text editor components comparison - TinyMCE
Dependencies (packages installed with npm install) ... To solve the sync issue, the @types/quill@1.3.7 and quill npm packages must align in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found