core.js:6498 ERROR TypeError: frappe_gantt__WEBPACK_IMPORTED_MODULE_0__ is not a constructor
at GanttComponent.ngOnInit (gantt.component.ts:42:19)
at callHook (core.js:2538:1)
at callHooks (core.js:2507:1)
at executeInitAndCheckHooks (core.js:2458:1)
at refreshView (core.js:9499:1)
at refreshEmbeddedViews (core.js:10609:1)
at refreshView (core.js:9508:1)
at refreshComponent (core.js:10655:1)
at refreshChildComponents (core.js:9280:1)
at refreshView (core.js:9534:1)
That's weird. We'll be fixing bugs and releasing a new version with a potentially different build (#286) - so please recheck after that. Keeping this open for now.
I am getting that error when I try to use this project, I dont know what I am doing wrong, here is my code:
import { Component, OnInit } from '@angular/core'; import * as Gantt from 'frappe-gantt';
@Component({ selector: 'app-gantt', templateUrl: './gantt.component.html', styleUrls: ['./gantt.component.scss'] }) export class GanttComponent implements OnInit {
ngOnInit(): void { const tasks = [ { id: 'Task 1', name: 'Google glass', start: '2021-03-01', end: '2021-06-20', progress: 0, dependencies: '', custom_class: 'bar-milestone', // optional }, { id: 'Task 2', name: 'Google glass', start: '2021-06-20', end: '2021-08-15', progress: 0, dependencies: 'Task 1', custom_class: 'bar-milestone', // optional }, { id: 'Task 2', name: 'Google glass', start: '2021-07-10', end: '2021-09-15', progress: 0, dependencies: 'Task 1', custom_class: 'bar-milestone', // optional }, ];
}
}
core.js:6498 ERROR TypeError: frappe_gantt__WEBPACK_IMPORTED_MODULE_0__ is not a constructor at GanttComponent.ngOnInit (gantt.component.ts:42:19) at callHook (core.js:2538:1) at callHooks (core.js:2507:1) at executeInitAndCheckHooks (core.js:2458:1) at refreshView (core.js:9499:1) at refreshEmbeddedViews (core.js:10609:1) at refreshView (core.js:9508:1) at refreshComponent (core.js:10655:1) at refreshChildComponents (core.js:9280:1) at refreshView (core.js:9534:1)