gantt.addTaskLayer is not a function in React Application

I have installed dhtmlx-gantt using npm (version 8.0.6). I can use all the features but I am not able to use addTaskLayer in my code. I know that this is available in PRO version but what am I doing wrong here. And how can I use TRIAL version in react application?

Any help would be appreciated.

Thanks,
Anurag

Hello Anurag,
If you installed Gantt from npm, it means that you have the GPL version, that doesn’t have the addTaskLayer feature.

We don’t have an NPM package with the Pro version. But you can install Gantt as an NPM package the following way:

  1. Unpack Gantt to a specific folder, for example, to /opt/gantt_pro
  2. Use the following command to install Gantt:
npm install /opt/gantt_pro

You can read more about installation methods in the following article:
https://docs.dhtmlx.com/gantt/desktop__install_with_bower.html#addingproeditionintoproject