i am trying to use amcharts through npm, i run the command npm install@amcharts/amcharts4 in the i can see that now in my node modules and in my package.json i have all the modules associated with the amcharts, also my package.json got updated and now inludes this line "@amcharts/amcharts4": "^4.10.22", i have created two files an index.html and a charts.js. At the top of my app.js i added the following lines
import * as am4core from "@amcharts/amcharts4/core";
import * as am4charts from "@amcharts/amcharts4/charts";
import am4themes_animated from "@amcharts/amcharts4/themes/animated";
when i try to include my charts.hs in my index.html with the following script
<script src="charts.js"></script>
i get the same syntax error all the time and i still cant find a way to resolve it "Uncaught SyntaxError: Cannot use import statement outside a module " does anyone have any idea what i am doing wrong? thanks in advance