mdbootstrap / mdb-angular-ui-kit

Angular 18 & Bootstrap 5 & Material Design UI KIT
https://mdbootstrap.com/docs/angular/
Other
1.12k stars 282 forks source link

Can't resolve 'chart.js' #92

Closed ikismail closed 6 years ago

ikismail commented 6 years ago

Expected behavior

Actual behavior

Got Error after Installing angular-bootstrap-md Module not found: Error: Can't resolve 'chart.js'

Your working environment and MDB version information

I Installed "angular-bootstrap-md": "^6.2.4", and got error while running application My angular version

Angular CLI: 6.2.3
Node: 8.11.1
OS: win32 x64
Angular: 6.1.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Resources (screenshots, code snippets etc.)

ERROR in ./node_modules/angular-bootstrap-md/esm5/angular-bootstrap-md.es5.js
Module not found: Error: Can't resolve 'chart.js'

alt text For every question of technical nature, in order to get the most detailed answer as soon as possible, ask on our dedicated Support Forum

Bloodcast69 commented 6 years ago

@ikismail Try to install types for chart.js library, and check if problem is gone or not. Here's the line which you should type in your application's terminal: npm install --save-dev @types/chart.js

ikismail commented 6 years ago

@Bloodcast69 Still facing the same issue after installing @types/chart.js

Error: ERROR in ./node_modules/angular-bootstrap-md/esm5/angular-bootstrap-md.es5.js Module not found: Error: Can't resolve 'chart.js' in 'E:\**ProjectDirectory**\node_modules\angular-bootstrap-md\esm5' i 「wdm」: Failed to compile.

ikismail commented 6 years ago

"angular-bootstrap-md": "^6.1.1" working fine without any error

Bloodcast69 commented 6 years ago

@ikismail could you please provide me with reproduction steps, with which I'll be able to reproduce your problem?

ikismail commented 6 years ago

Hi @Bloodcast69 Here Is my environment Settings

I tried to install angular-bootstrap-md for my angular application of version ^6.2.4, When I run npm serve It throws

ERROR in ./node_modules/angular-bootstrap-md/esm5/angular-bootstrap-md.es5.js Module not found: Error: Can't resolve 'chart.js' in 'E:\**ProjectDirectory**\node_modules\angular-bootstrap-md\esm5' i 「wdm」: Failed to compile.

idzark commented 6 years ago

Hello @ikismail Please install chart.js package and update scripts array in angular.json with:

"node_modules/chart.js/dist/Chart.js"

ambujkhanna commented 5 years ago

This warning still present

WARNING in ./node_modules/angular-bootstrap-md/esm5/angular-bootstrap-md.es5.js 6986:53-69 "export 'defineInjectable' was not found in '@angular/core'

image

Bloodcast69 commented 5 years ago

@ambujkhanna

Could you please try to remove package-lock.json file and node_modules directory, and execute npm install one more time?

If this won't resolve your problem, could you please provide me with the reproduction repository on which I'll be able to debug your case?

Best Regards, Damian

shardulsonar commented 5 years ago

Getting the same error !

ambujkhanna commented 5 years ago

I have already tried these steps but not resolved so i have removed it and now I am using "amCharts" and I find it much better and simple.

Bloodcast69 commented 5 years ago

Guys if you want help from me, please show me the code which produces you those errors.

Without it, I won't be able to help you well.

ambujkhanna commented 5 years ago

i didn't write any special code. I just installed and it fires me error in the library.

Bloodcast69 commented 5 years ago

Could you please send me your project at my email? d.gemza@mdbootstrap.com