Do you use the latest version 4.1.3 of Gantt? The error looks familiar but it was already fixed. If the latest version won't help post please a showcase that we can run, investigate and debug.
Sorry, we cannot offer 1-on-1 debugging assistance (for free at least, options here: https://www.bryntum.com/services/). Ideally you post a simple test case showing the defect so we can inspect it. Either remove all non relevant code in your app, or modify one of our examples to show the issue (might be faster)
I have downloaded 4.1.3 Gantt trial and tried to build timeranges demo that uses Angular 8.2.14 and everything works as expected, both production build and development server, so the version is not the cause.
Note: There is no need to import Gantt wrapper separately and add it to declarations – BryntumGanttModule is all what is needed as described in the guide and demonstrated in the examples. Generally, our examples show the recommended practices.
Our examples are tested to be workable so Advanced works as well and you can use it as a reference of the workable code. Advanced demo uses Angular version 7.2 so this upgrade guide applies: https://update.angular.io/?v=7.2-8.1