You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently using Prime React in a project, and most of the time there is no error, but once in a while when deploying to a new machine, the following error occurs: Can't resolve 'chart.js/src/chart.js'
Current behavior
Currently using Prime React in a project, and most of the time there is no error, but once in a while when deploying to a new machine, the following error occurs:
Can't resolve 'chart.js/src/chart.js'
Part of my Package.json
Expected behavior
It should be able to find the chart.js dependency
Minimal reproduction of the problem with instructions
Error is intermitent
Please tell us about your environment:
Ubuntu 18
npm -version
6.9.0
node --version
v9.4.0
React version:
16.8
PrimeReact version:
2.0.1
Language:
ES6/7
Solution:
Sometimes the error is fixed by doing
npm install --save chart.js
However I was able to completely fix it by changing line 18 in
node_modules/primereact/components/chart/Chart.js
:to this
This fixed my problem.
I am more than willing to provide the patch but I am unsure as to how to proceed.
Thank you very much.
The text was updated successfully, but these errors were encountered: