Skip to content

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

Description

@akhtarshahnawaz

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions