In my simple html + js project i have installed paper.js using npm install paper . But when i am trying to use a class new Point() , VS code is saying to convert it to E6 module . After click on the bulb i am continuously getting "Unexpected token (1:7)" for the line , import { Point } from "node_modules/paper/dist/paper-full.js"
My main file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>POI</title>
<script type="text/javascript" src="node_modules/paper/dist/paper-full.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/paperscript" src="js/svg.js" canvas="canvas"></script>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<canvas id="canvas" resize></canvas>
</body>
</html>
svg.js Where i am trying to read the Point Class which is paper-full.js
import { Point } from "node_modules/paper/dist/paper-full.js"
var pois = [] ;
$(function() {
// Trying to load the class
new Point();
});