Open LyricTian opened 7 years ago
Can you please check against 0.8.6 && also check this issue: #152
Any news on the issue?
same problem for me - with version 0.8.6. "ng build" works, "ng build -p" throws the error above.
I also tried to remove the ImageCropperComponent from the ImageCropperModule (like https://github.com/cstefanache/angular2-img-cropper/issues/#126#issuecomment-283909666 did), but this didn't work either...
@geraldhe, take a look here https://github.com/cstefanache/angular2-img-cropper/issues/126#issuecomment-276027945
yes, that worked. thanks a lot for the really useful module!
Iam using it for Ionic. I am using 'ImageCropperComponent' in 'app.module.ts' and then in 'crop-image.ts'. In app.module, I am importing it and adding it to Declarations. In crop-image, I am almost using a copied version of the Git example.
Everything working, if I am not using it for production --prod. Please help, where do I need to make changes.
I have the same issue on version 0.9.0
I sorted this out by doing following:
import {ImageCropperComponent} from 'ng2-img-cropper';
in module.tsimport {ImageCropperModule} from "ng2-img-cropper/index";
insteadimport { ImageCropperComponent, CropperSettings } from 'ng2-img-cropper';
in crop page according to usageNot working for me i did same thing but no success. Plz help me.
ERROR in Type ImageCropperComponent in /Users/lyric/VSProjects/angular-operpf/node_modules/ng2-img-cropper/src/imageCropperComponent.ts is part of the declarations of 2 modules: ImageCropperModule in /Users/lyric/VSProjects/angular-operpf/node_modules/ng2-img-cropper/src/imageCropperModule.ts and AdminModule in /Users/lyric/VSProjects/angular-operpf/src/app/admin/admin.module.ts! Please consider moving ImageCropperComponent in /Users/lyric/VSProjects/angular-operpf/node_modules/ng2-img-cropper/src/imageCropperComponent.ts to a higher module that imports ImageCropperModule in /Users/lyric/VSProjects/angular-operpf/node_modules/ng2-img-cropper/src/imageCropperModule.ts and AdminModule in /Users/lyric/VSProjects/angular-operpf/src/app/admin/admin.module.ts. You can also create a new NgModule that exports and includes ImageCropperComponent in /Users/lyric/VSProjects/angular-operpf/node_modules/ng2-img-cropper/src/imageCropperComponent.ts then import that NgModule in ImageCropperModule in /Users/lyric/VSProjects/angular-operpf/node_modules/ng2-img-cropper/src/imageCropperModule.ts and AdminModule in /Users/lyric/VSProjects/angular-operpf/src/app/admin/admin.module.ts.
ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/Users/lyric/VSProjects/angular-operpf/src' @ ./src/main.ts 6:0-74 @ multi ./src/main.ts