Relative Content

Tag Archive for javascriptimportmediapipe

How to import vision from MediaPipe in javascript?

I’m trying to use Mediapipe for javascript in a project. There is an example below by the MediaPipe authors.
https://codepen.io/mediapipe-preview/pen/OJBVQJm
However, when I try this code and host it locally in vscode it gives me an error:
Uncaught SyntaxError: Cannot use import statement outside a module. This references the first line in the js file. Vision is used on the following line.