amit
amit

Reputation: 2331

"Module not found: Error: Can't resolve" when installing from GitHub. Regular install works

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?

Upvotes: 1

Views: 16871

Answers (2)

pawanzZ
pawanzZ

Reputation: 59

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.

Upvotes: 0

Sibeesh Venu
Sibeesh Venu

Reputation: 21749

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.

Upvotes: 10

Related Questions