Chartjs-Chart is not defined Node.js Chart.js

0👍

You are loading your logic.js file before the chart.js script tag file, so chart.js isn’t loaded yet but you try to acces it, if you switch it up like so it should work:

script(type='text/javascript' src='https://cdn.jsdelivr.net/npm/chart.js@2.9.3')    
script(src='/javascripts/logic.js')

Leave a comment