1

I'm using Quilljs (javascript library) for an Angular project.

when installed by:

npm install --save quill

All seems to work well and Quill class can be imported to typeScript file via:

import * as Quill from 'quill'

But when attempting to install the latest version from GitHub by:

npm --save install quilljs/quill

although the installation seems to be successfull, when attempting to import Quill in the typescript file, i get:

Module not found: Error: Can't resolve 'quill' in.. webpack: Failed to compile.

Any ideas?

4
  • have you tried import * as Quill from 'quilljs/quill' ? Commented Jun 6, 2017 at 13:14
  • i think that you cannot import some library that is not written with typescript Commented Jun 6, 2017 at 13:14
  • Have you tried github.com/KillerCodeMonkey/ngx-quill? Commented Jun 6, 2017 at 16:02
  • @Supamiu, thanks i did. I need to write my own component that link to a forked version of Quill.. Commented Jun 6, 2017 at 16:05

2 Answers 2

10

I was getting this error in my Angular 7 application after I installed ngx-quill (npm install ngx-quill) and when I run ng s.

ERROR in ./node_modules/ngx-quill/fesm5/ngx-quill.js
Module not found: Error: Can't resolve 'quill' in 'C:\SourceCode\Project\node_modules\ngx-quill\fesm5'

To fix this error, I had to run npm i -S quill as quill is a dependency of ngx-quill.

Please also make sure that you have installed the other dependencies, @angular/core, @angular/common, @angular/forms, and rxjs. This information is been mentioned here.

Sign up to request clarification or add additional context in comments.

Comments

0

npm install quill and @types/quill to the latest.

I faced the same issue when upgrading from angular 5 to 8. Hope this helps others who are watching this.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.