When I run dev server using npm run dev, I get error that SyntaxError: Cannot use import statement outside a module. I checked online to find an solution, but I saw many people are having the same issue with the example project and no one seems to have found a solution. For example, this one on reddit is having the same issue: https://www.reddit.com/r/typescript/comments/sxi1y7/syntaxerror_cannot_use_import_statement_outside_a/
Is there any easy fix to it? And is there an easy to follow article in documentation about running a basic example?
I tried to run the example provided in https://github.com/mathigon/studio/tree/main/docs/example, but I am unable to run it.
When I run dev server using
npm run dev
, I get error thatSyntaxError: Cannot use import statement outside a module
. I checked online to find an solution, but I saw many people are having the same issue with the example project and no one seems to have found a solution. For example, this one on reddit is having the same issue: https://www.reddit.com/r/typescript/comments/sxi1y7/syntaxerror_cannot_use_import_statement_outside_a/Is there any easy fix to it? And is there an easy to follow article in documentation about running a basic example?