I want to try the following npm package, camera-capture, to capture videos from my webcam. I am very new to both npm and typescript, so I'm not sure how to test it properly. What I did so far is the following:
- Copied this example, then saved it in an
index.js
file - Tried executing it from the terminal using
node index.js
I received the following error:
SyntaxError: Cannot use import statement outside a module
I know that what I'm doing might be so wrong, however, as a beginner, the explanation on the package's homepage is not enough for me, I need to know about further steps to make it work properly.
My question is: How to set the proper environment to run a test for this library?