Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParseError: 'import' and 'export' may appear only with 'sourceType: module' #429

Open
hajiz opened this issue Mar 5, 2017 · 1 comment

Comments

@hajiz
Copy link

hajiz commented Mar 5, 2017

Hi team,

I cloned this repository for the first time, then ran npm install, was successful but when I run npm run example:basic I get the following error:

> [email protected] example:basic <path>/deku
> budo examples/basic/index.js -- -t babelify

[0000] info  Server running at http://<ip:port>/ (connect)

<path>/deku/examples/basic/index.js:1
import { createApp } from '../../src';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

Any idea of what might be happening? Can it be a library version, e.g. Babel?

Thanks

pocka added a commit to pocka/deku that referenced this issue Mar 8, 2017
@pocka
Copy link

pocka commented Mar 8, 2017

missing BABEL_ENV in package.json causes this.
Try this:

./node_modules/.bin/cross-env BABEL_ENV=commonjs npm run example:basic

it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants