Capacitor Javascript Chart.js

Hello,
I need to make as simple as possible multiplatform application (Windows, macOS, iOS, Android) I chose html, css + js. And for Windows and Mac I use electron (everything works here). And for iOS and Android I chose Capacitor. I have converted and launched the project, after some time everything works (HTTP GET and SET), but I have a problem with chart.js charts in Capacitor. I installed the plugin:
npm install chart.js
And added to package.json:
"chart.js":"^4.4.2"
Next in the .js file where I want to use the charts:
<script src="../node_modules/chart.js/dist/chart.umd.js"></script>
And then I already use the plugin.
The problem is that on both android and iOS I only get a blank space rendered. (In Electron everything works).
I would be very grateful for advice.

Thank you and excuse me. I am a newbie

You don’t typically reference a script in the node_modules folder because that doesn’t get shipped when you build the app. That is probably your issue because Capacitor isn’t going to copy the node_modules folder to the device.

Might be good to read up on Chart.js Integration.

You can also debug your app running on the device in DevTools to see any errors.