ParseError: 'import' and 'export' may appear only with 'sourceType: module'
hajiz opened this issue · comments
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:
> deku@2.0.0-rc16 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
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.