mathigon / studio

A customisable NodeJS server for creating and hosting highly interactive online courses.
https://mathigon.io
Other
39 stars 20 forks source link

Unable to run the example : SyntaxError: Cannot use import statement outside a module #360

Open akhtarshahnawaz opened 4 months ago

akhtarshahnawaz commented 4 months ago

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 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?

nileshtrivedi commented 3 months ago

@akhtarshahnawaz I ran into this as well. Were you able to find a solution for this?