cstefanache / angular2-img-cropper

Angular 2 Image Cropper
MIT License
364 stars 135 forks source link

Webpack error #113

Closed donmanuelmontes closed 7 years ago

donmanuelmontes commented 7 years ago

Hi,

I get this error when I try to import the library into my project (I'm using Webpack, not SystemJS): Uncaught SyntaxError: Unexpected token export.

Do you have any idea why this is happening?

Thanks.

james-criscuolo commented 7 years ago

Are there any ideas on this? I get a different syntax error from zone:

Error: Unexpected value 'ImageCropperComponent' declared by the module 'appModule'

This occurs when I use the ImageCropperModule as well. Upon googling, it seems this has to do with webpack having an issue with relative paths or npm-link'ed installs, but I haven't been able to get to the bottom of it. Even copying the files into my project and attempting to import them as if they are any other component/module leads to these issues with webpack2.

I've seen a couple questions in various issues regarding webpack, but I was unable to find any explanations, so apologies if this has been explained elsewhere.

james-criscuolo commented 7 years ago

I put this down for a bit, then kept digging, and it turns out this was my error (for those curious):

https://github.com/angular/angular/issues/15178

cstefanache commented 7 years ago

Can you please try with 0.8.4? Refactored to work with Angular 4