Ngx-quill: Module errors

Created on 18 Apr 2020  Â·  13Comments  Â·  Source: KillerCodeMonkey/ngx-quill

Upgraded to the latest version 8.1.5 and could no longer build the project
Using Angular 9.1.2

Had to downgrade to "ngx-quill": "^8.1.3" and everything built with no errors.

Time: 29789ms
: Compiled successfully.
95% emitting CopyPlugin    
    ERROR in node_modules/ngx-quill/src/quill.d.ts:2:24 - error TS7016: Could not find a declaration file for module 'quill-delta'. 'C:/Users/Pedro Rivera/Documents/Deveopment/USSI/e-solutions/node_modules/quill-delta/lib/delta.js' implicitly has an 'any' type.
      Try `npm install @types/quill-delta` if it exists or add a new declaration (.d.ts) file containing `declare module 'quill-delta';` 

    2 import Delta = require('quill-delta')
                             ~~~~~~~~~~~~~
    node_modules/ngx-quill/src/quill-editor.component.d.ts:92:39 - error TS7016: Could not find a declaration file for module 'quill-delta'. 'C:/Users/Pedro Rivera/Documents/Deveopment/USSI/e-solutions/node_modules/quill-delta/lib/delta.js' implicitly has an 'any' type.    
      Try `npm install @types/quill-delta` if it exists or add a new declaration (.d.ts) file containing `declare module 'quill-delta';` 

    92     textChangeHandler: (delta: import("quill-delta"), oldDelta: import("quill-delta"), source: string) => void;
                                             ~~~~~~~~~~~~~
    node_modules/ngx-quill/src/quill-editor.component.d.ts:92:72 - error TS7016: Could not find a declaration file for module 'quill-delta'. 'C:/Users/Pedro Rivera/Documents/Deveopment/USSI/e-solutions/node_modules/quill-delta/lib/delta.js' implicitly has an 'any' type.    
      Try `npm install @types/quill-delta` if it exists or add a new declaration (.d.ts) file containing `declare module 'quill-delta';` 

    92     textChangeHandler: (delta: import("quill-delta"), oldDelta: import("quill-delta"), source: string) => void;
                                                                              ~~~~~~~~~~~~~

Most helpful comment

just use the correct version of @types/quill...

v2 is for quilljs 2... so just use the latest 1.x version

All 13 comments

Install @types/quill-delta, but my example repo is working without IT.

How do you use ngx-quill?

Pedro notifications@github.com schrieb am Sa., 18. Apr. 2020, 19:48:

Upgraded to the latest version 8.1.5 and could no longer build the project
Using Angular 9.1.2

Had to downgrade to "ngx-quill": "^8.1.3" and everything built with no
errors.

Time: 29789ms
: Compiled successfully.
95% emitting CopyPlugin
ERROR in node_modules/ngx-quill/src/quill.d.ts:2:24 - error TS7016: Could not find a declaration file for module 'quill-delta'. 'C:/Users/Pedro Rivera/Documents/Deveopment/USSI/e-solutions/node_modules/quill-delta/lib/delta.js' implicitly has an 'any' type.
Try npm install @types/quill-delta if it exists or add a new declaration (.d.ts) file containing declare module 'quill-delta';

2 import Delta = require('quill-delta')
                         ~~~~~~~~~~~~~
node_modules/ngx-quill/src/quill-editor.component.d.ts:92:39 - error TS7016: Could not find a declaration file for module 'quill-delta'. 'C:/Users/Pedro Rivera/Documents/Deveopment/USSI/e-solutions/node_modules/quill-delta/lib/delta.js' implicitly has an 'any' type.
  Try `npm install @types/quill-delta` if it exists or add a new declaration (.d.ts) file containing `declare module 'quill-delta';`

92     textChangeHandler: (delta: import("quill-delta"), oldDelta: import("quill-delta"), source: string) => void;
                                         ~~~~~~~~~~~~~
node_modules/ngx-quill/src/quill-editor.component.d.ts:92:72 - error TS7016: Could not find a declaration file for module 'quill-delta'. 'C:/Users/Pedro Rivera/Documents/Deveopment/USSI/e-solutions/node_modules/quill-delta/lib/delta.js' implicitly has an 'any' type.
  Try `npm install @types/quill-delta` if it exists or add a new declaration (.d.ts) file containing `declare module 'quill-delta';`

92     textChangeHandler: (delta: import("quill-delta"), oldDelta: import("quill-delta"), source: string) => void;
                                                                          ~~~~~~~~~~~~~

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/KillerCodeMonkey/ngx-quill/issues/853, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARI4YGGAVGKHGQ5G3VXEPLRNHRXLANCNFSM4MLODKBA
.

I originally tried that and had this error:

$ npm install @types/quill-delta
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2fquill-delta - Not found
npm ERR! 404
npm ERR! 404  '@types/quill-delta@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Pedro Rivera\AppData\Roaming\npm-cache\_logs\2020-04-18T17_52_56_408Z-debug.log

Okay. Because i do Not Need to add typings in ngx-quill and
ngx-quill-example.

Could you try to Just Install quill-delta?

Pedro notifications@github.com schrieb am Sa., 18. Apr. 2020, 19:54:

I originally tried that and had this error:

$ npm install @types/quill-delta
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2fquill-delta - Not found
npm ERR! 404
npm ERR! 404 '@types/quill-delta@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Pedro Rivera\AppData\Roamingnpm-cache_logs\2020-04-18T17_52_56_408Z-debug.log

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/KillerCodeMonkey/ngx-quill/issues/853#issuecomment-615912797,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARI4YHPLDBILWN7B3LXRCLRNHSNXANCNFSM4MLODKBA
.

That did the trick. Works perfectly after installing quill-data.

Thanks!!

released v81.6. where i fixed peer dependencies and added the new peer deps to the readme.

@pedrojrivera i found out why it was working in my demo repo:
there i am using @types/quill, which is installing both needed deps

please use the latest release. no peer deps needed.

@KillerCodeMonkey I uninstalled everything, then reinstalled ngx-quill and @types/quill.

Everything works as expected. Thanks!

Did I need @types/quill?

Quill typings are not required. If you are Not importing quill anywhere.

I had problems with the @types/quill so i do not really use them.

Pedro notifications@github.com schrieb am So., 19. Apr. 2020, 00:05:

Did I need @types/quill?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/KillerCodeMonkey/ngx-quill/issues/853#issuecomment-615959368,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARI4YBCUMHELJKARQDEHITRNIP2XANCNFSM4MLODKBA
.

I'm having a similar issue. Everyhting works fine but I have this errors during build :
ERROR in node_modules/ngx-quill/lib/quill-editor.component.d.ts:3:34 - error TS7016: Could not find a declaration file for module 'quill'. '/Users/chloe/DevTom/centaurus-frontend/node_modules/quill/dist/quill.js' implicitly has an 'any' type. Trynpm install @types/quillif it exists or add a new declaration (.d.ts) file containingdeclare module 'quill';`

3 import QuillType, { Delta } from 'quill';
~~~
node_modules/ngx-quill/lib/quill-view.component.d.ts:1:23 - error TS7016: Could not find a declaration file for module 'quill'. '/Users/chloe/DevTom/centaurus-frontend/node_modules/quill/dist/quill.js' implicitly has an 'any' type.
Try npm install @types/quill if it exists or add a new declaration (.d.ts) file containing declare module 'quill';

1 import QuillType from 'quill';
I tried to install @types/quill but now I have more errors : ERROR in node_modules/@types/quill/node_modules/quill-delta/dist/Delta.d.ts:1:8 - error TS1259: Module '"/Users/chloe/DevTom/centaurus-frontend/node_modules/@types/quill/node_modules/fast-diff/diff"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

1 import diff from 'fast-diff';
~~~~

node_modules/@types/quill/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.
node_modules/ngx-quill/lib/quill-editor.component.d.ts:3:21 - error TS2614: Module '"../../@types/quill"' has no exported member 'Delta'. Did you mean to use 'import Delta from "../../@types/quill"' instead?

3 import QuillType, { Delta } from 'quill';
~

* Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ *
70% building 213/213 modules 0 active
ERROR in node_modules/@types/quill/node_modules/quill-delta/dist/Delta.d.ts:1:8 - error TS1259: Module '"/Users/chloe/DevTom/centaurus-frontend/node_modules/@types/quill/node_modules/fast-diff/diff"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

1 import diff from 'fast-diff';
         ~~~~

  node_modules/@types/quill/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.
node_modules/ngx-quill/lib/quill-editor.component.d.ts:3:21 - error TS2614: Module '"../../@types/quill"' has no exported member 'Delta'. Did you mean to use 'import Delta from "../../@types/quill"' instead?

3 import QuillType, { Delta } from 'quill';
                      ~~~~~

`

just use the correct version of @types/quill...

v2 is for quilljs 2... so just use the latest 1.x version

Great, it's working thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carlhussey picture carlhussey  Â·  21Comments

zpydee picture zpydee  Â·  80Comments

ShaneJohnsonCC picture ShaneJohnsonCC  Â·  18Comments

matrium0 picture matrium0  Â·  20Comments

ThomasOliver545 picture ThomasOliver545  Â·  24Comments