“Error loading module node_modules/dhtmlx-gantt”
“ReferenceError: window is not defined at Object. (C:\Desktop\Garbage\Files\prot\node_modules\dhtmlx-gantt\codebase\dhtmlxgantt.js:15:401)”
Is there a way to identify the error?
“Error loading module node_modules/dhtmlx-gantt”
“ReferenceError: window is not defined at Object. (C:\Desktop\Garbage\Files\prot\node_modules\dhtmlx-gantt\codebase\dhtmlxgantt.js:15:401)”
Is there a way to identify the error?
Hi,
Looks like you’re trying to import gantt module into the server script (i.e. somewhere in your nodejs code you do require("dhtmlx-gantt")
). dhtmlxGantt is a browser library so it won’t work on the server.
Is there any possible way to run Gantt on the server side? I saw an npm package available, but I couldn’t access it.
DHTMLX Gantt isn’t a server-side library, so you can’t run it on server.
And yes, you can get Gantt chart code using npm, if you create the application with Angular for example . Here is a tutorial