Chart: Can't resolve module
Module not found: Can't resolve 'chart.js' in '/client/node_modules/primereact/components/chart'
Try simply deleting your node_modules; and re-run npm i. Or else you can try to delete your package-lock.json too (combined with node_modules) and re-run npm i. Note that this will update your dependencies according to what you've specified in package.json.
I did several times. Tried with npm & yarn as well.
Can you post your package.json here? Or upload a sample-project to reproduce this issue?
@TylerKnvpp You should add "chart.js" dependency into your project.
npm install chart.js --save or yarn add chart.js --dev
https://www.primefaces.org/primereact/showcase/#/setup
Apologies for bumping an older thread, but I just stumbled upon this as well. Wouldn't this warrant a peerDependencies entry? I realize it's an optional dependency based on whether you plan to use the Chart component, but isn't this the sort of thing peerDependencies is meant for? I see that chart.js is a devDependency in the package json. Without an entry in peerDependencies, it's not 100% clear which version of the dependent library is required.
Please use the forum or discord channel for questions and help requests.