akserg / ng2-toasty

Angular2 Toasty component shows growl-style alerts and messages for your app.
MIT License
283 stars 102 forks source link

import {Toasty} from './src/toasty.container'; ^ ParseError: 'import' and 'export' may appear only with 'sourceType: module' #24

Closed rtm closed 8 years ago

rtm commented 8 years ago

After installing ng2-toasty, a build gives me the following error:

/home/rtm/repos/triconinfotech/hitouch/node_modules/ng2-toasty/ng2-toasty.ts:7
import {Toasty} from './src/toasty.container';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

My tsconfig.json file is bare-bones, with neither files/filesGlob/excludes entries.

Do I need to do something with the gulpfile? This is angular2 with ionic2 if that matters.

NathofGod commented 8 years ago

I'm having the same issue. Compiling with Browserify

......./node_modules/ng2-toasty/ng2-toasty.ts:7 import {Toasty} from './src/toasty.container'; ^ ParseError: 'import' and 'export' may appear only with 'sourceType: module'

akserg commented 8 years ago

I need to remove the source code from the build. Will do it tomorrow. Thanks.

akserg commented 8 years ago

Please use 2.0.0 release to confirm that issue is gone.