Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with dependency on @types/quill #415

Closed
darioseidl opened this issue Oct 9, 2018 · 9 comments
Closed

Problem with dependency on @types/quill #415

darioseidl opened this issue Oct 9, 2018 · 9 comments

Comments

@darioseidl
Copy link

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.

@lepinejf
Copy link

lepinejf commented Oct 9, 2018

Please fix this

@lepinejf
Copy link

Hello ? @zenoamaro ?

@daggmano
Copy link
Contributor

@darioseidl It looks like your workaround does not work for npm users, as resolutions is a yarn-only feature.

daggmano added a commit to daggmano/react-quill that referenced this issue Oct 29, 2018
@timothyallan
Copy link

going into node_modules/react-quill/node_modules/@types and deleting the quill folder is a terrible workaround that fixes compile errors until the next time you npm install 😢

@jordananders
Copy link

jordananders commented Nov 20, 2018

npm i -DE @types/quill@1.3.6

@Abjuk
Copy link

Abjuk commented 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"

@alexkrolick
Copy link
Collaborator

alexkrolick commented Nov 28, 2018

PR welcome to fix this 😄

@darioseidl
Copy link
Author

Thanks @daggmano and @alexkrolick, this is fixed in react-quill 1.3.3.

@sonustar
Copy link

I want to ask something like how to remove the outer border of react-quill .. Since I rendered a HTML and want to convert it in rich text .. I want to remove the border of the editor please help anyone!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants