Skip to content

Cannot use import statement outside a module #33

Description

@konsumer

I think you need "type": "module" in your package.json.

When I import from a project that is setup this way, like this:

import fetchProgress from 'fetch-progress'

I get this:

/Users/konsumer/Desktop/videoexample/node_modules/fetch-progress/index.js:1
import Progress from './Progress';
^^^^^^

SyntaxError: Cannot use import statement outside a module

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions