Open TomasHubelbauer opened 2 years ago
When i start this project it also has this errors: Failed to parse source map: 'webpack://ibm-gantt-chart/C:/Users/yotamberk/Desktop/workspace/vis/dist/vis.js' URL is not supported.
Any ideas how to fix it ?
I am using React 18.2.0 and I am getting this recurrent error.
Cannot read properties of undefined (reading 'appendChild') GanttPanel.create https://s8yt6v.csb.app/node_modules/ibm-gantt-chart/dist/ibm-gantt-chart.js:18692:17 GanttPanel.setConfiguration https://s8yt6v.csb.app/node_modules/ibm-gantt-chart/dist/ibm-gantt-chart.js:18595:14
I can see that the component is getting rendered, but still getting this error. I had to downgrade to React 17 to make it work.
I am using React 18.2.0 and I am getting this recurrent error.
Cannot read properties of undefined (reading 'appendChild') GanttPanel.create https://s8yt6v.csb.app/node_modules/ibm-gantt-chart/dist/ibm-gantt-chart.js:18692:17 GanttPanel.setConfiguration https://s8yt6v.csb.app/node_modules/ibm-gantt-chart/dist/ibm-gantt-chart.js:18595:14
I can see that the component is getting rendered, but still getting this error. I had to downgrade to React 17 to make it work.
same here
Hi, I am attempting to evaluate this component in an application based on Create React App. The CRA template I have used is recent, and it uses React 18. It seems the React peer dependency of
ibm-gantt-chart-react
is hardcoded to16.8.6
:https://github.com/IBM/gantt-chart/blob/master/packages/ibm-gantt-chart-react/package.json#L42
When trying to install the component using
npm i ibm-gantt-chart-react
, NPM throws this error:This error will likely happen to anyone using latest React, regardless of whether they are using CRA or not.
Using
npm i ibm-gantt-chart-react --legacy-peer-deps
works, because to my knowledge there are no breaking changes between 16.8.6 and 18.0.0 that would prevent this component from working.I think you could solve this issue by not hardcoding a React version in the peer dependency, but instead making it a range that accepts anything between 16.8.6 and 18. See these links:
Hope this helps.