Hello, we are currently using dhtmlxGantt v.7.0.4 Professional which we had purchased in 2019. We are consuming this package in our react 17.0.2 app, which is currently using react-script 3.4.3. Due to some critical security vulnerabilities in transitive dependencies of react-scripts, we are looking to migrate from 3.4.3 -> 4.0.3, then finally to 5.0.0.
I have my entire application working as expected under react-scripts 4.0.3 at this point. Unfortunately I was only able to do this by removing the imports of
import { gantt } from './dhtmlxgantt/dhtmlxgantt';
from the project.
I have also confirmed that reverting back to react-scripts 3.4.3 removes the issue we are seeing.
When we perform the upgrade of react-scripts then run the application locally we see the following errors in the browser console:
Uncaught ReferenceError: process is not defined
dhtmlxgantt.js:8398 Uncaught TypeError: Cannot read properties of undefined (reading 'signature')
Uncaught TypeError: Cannot read properties of undefined (reading 'signature')
at module.exports (dhtmlxgantt.js:8398:1)
at module.exports (dhtmlxgantt.js:48651:1)
at GanttFactory.module.exports [as _factoryMethod] (dhtmlxgantt.js:48815:1)
at GanttFactory.getGanttInstance (dhtmlxgantt.js:48537:1)
at Object../sources/dhtmlxgantt.enterprise.ts (dhtmlxgantt.js:40562:1)
at __webpack_require__ (dhtmlxgantt.js:39:1)
at dhtmlxgantt.js:132:1
at dhtmlxgantt.js:136:1
at webpackUniversalModuleDefinition (dhtmlxgantt.js:13:1)
at Object.<anonymous> (dhtmlxgantt.js:19:1)
at Object../src/Pages/CaseManagement/CaseRow/dhtmlxgantt/dhtmlxgantt.js (dhtmlxgantt.js:53026:1)
at __webpack_require__ (bootstrap:851:1)
at fn (bootstrap:150:1)
at Module.<anonymous> (dhtmlxgantt.js:53026:1)
at Module../src/Pages/CaseManagement/CaseRow/index.tsx (index.tsx:197:1)
at __webpack_require__ (bootstrap:851:1)
at fn (bootstrap:150:1)
at Module.<anonymous> (index.tsx:197:1)
at Module../src/Pages/CaseManagement/index.tsx (index.tsx:47:1)
at __webpack_require__ (bootstrap:851:1)
at fn (bootstrap:150:1)
at Module.<anonymous> (index.tsx:20:1)
at Module../src/Pages/index.tsx (index.tsx:20:1)
at __webpack_require__ (bootstrap:851:1)
at fn (bootstrap:150:1)
at Module.<anonymous> (antd.css:7:1)
at Module../src/App.tsx (App.tsx:72:1)
at __webpack_require__ (bootstrap:851:1)
at fn (bootstrap:150:1)
at Module.<anonymous> (configureStore.ts:92:1)
at Module../src/index.tsx (index.tsx:48:1)
at __webpack_require__ (bootstrap:851:1)
at fn (bootstrap:150:1)
at Object.1 (wdyr.ts:14:1)
at __webpack_require__ (bootstrap:851:1)
at checkDeferredModules (bootstrap:45:1)
at Array.webpackJsonpCallback [as push] (bootstrap:32:1)
at main.chunk.js:1:85
Is there some way to fix this? Do we need a newer version of dhtmlxgantt that will support the upgrade?