Chartjs-Unexpected token '{'. import call expects exactly one argument – when trying to import chart.js

2👍

Solved

I used a different link in the script tag. Instead of /chart.js I used /chart.umd.js.

script(src="/scripts/chart.umd.js")

Then I was not required to use any-side import statement in the client side index.js file

Leave a comment