-
-
Notifications
You must be signed in to change notification settings - Fork 78
Could not find a declaration file for module 'plotly.js/dist/plotly.js' #155
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
Comments
Hello @priyatham-k , have you tried installing the |
Thanks, @andrefarzat for responding, installed @types/plotly.js in the project, but no luck ,still the same error... |
@priyatham-k I did a research and find out that the .d.ts files for plotly is quite complicated. Please see this comment for a .d.ts file an user has created: plotly/plotly.js#28 (comment) |
Same issue :( any news? |
@StefanAleksik have you checked the comment I mentioned ( plotly/plotly.js#28 (comment) ) ? |
Is there any update on this? @andrefarzat, the comment you're referencing provides a TDS for 1.53 which is about a year old |
I have this issue as well. Does anyone has solution for this? I have been seeking fixing method for a whole day, very frustrated. |
@dongqiuyinggrace
then go to in import { NgModule } from '@angular/core';
import * as PlotlyJS from 'plotly.js-dist';
import { PlotlyModule } from 'angular-plotly.js';
PlotlyModule.plotlyjs = PlotlyJS;
@NgModule({
imports: [CommonModule, PlotlyModule],
...
})
export class AppModule { } and it should works |
It indeed works, thank you very much! |
For anyone else coming along, the solution by @CorentinMAG works, but instead of renaming the directory, you should install it as an alias. that way you will have consistent environments wherever you need them
|
@brmc big thanks for your suggestion, worked like a charm |
"@angular/animations": "~11.0.9",
"@angular/common": "~11.0.9",
"@angular/compiler": "~11.0.9",
"@angular/core": "~11.0.9",
"@angular/forms": "~11.0.9",
"@angular/platform-browser": "~11.0.9",
"@angular/platform-browser-dynamic": "~11.0.9",
"@angular/router": "~11.0.9",
"angular-plotly.js": "^3.0.0",
"bootstrap": "^4.6.0",
"moment": "^2.29.1",
"ng-click-outside": "^7.0.1",
"ngx-color-picker": "^11.0.0",
"ngx-pagination": "^5.0.0",
"plotly.js": "^1.58.4",
"plotly.js-dist": "^1.58.4",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
why I'm getting this
Could not find a declaration file for module 'plotly.js/dist/plotly.js'.
The text was updated successfully, but these errors were encountered: