0👍
Try the CDN method by adding this to the layout.pug anywhere in the head section:
script(src='https://cdnjs.com/libraries/Chart.js')
Take a look at this question to see more details on how to reference chartjs as a local file from node_modules.
CDN is a lot easier to configure and will also be more economical as your server won’t bear the load of serving the library to your users.
- Chartjs-Call chartjs in rhino using java
- Chartjs-How to set same borderColor and backgroundColor in chartjs javascript
Source:stackexchange.com