Closed naveedahmed1 closed 7 years ago
I am having a similar error to @naveedahmed1:
ERROR in Can't export value ImageCropperModule in /Users/agustin/Documents/projects/surfercoder/arc10/node_modules/ng2-img-cropper/src/imageCropperModule.d.ts from SharedModule in /Users/agustin/Documents/projects/surfercoder/arc10/src/app/shared/shared.module.ts as it was neither declared nor imported!
ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/Users/agustin/Documents/projects/surfercoder/arc10/src' @ ./src/main.ts 4:0-74 @ multi ./src/main.ts
And the module is there and it is being exported.
Besides that, could you please run linter on your code? I am getting several warnings too :)
Thanks in advance.
getting this error after update to angular 4.0.0
have the same issue with angular 4.0.0. I could do ng serve but noway with ng build --aot --prod
ERROR in Unexpected value 'ImageCropperComponent in C:/Users/huajinso/sakura/nod e_modules/ng2-img-cropper/src/imageCropperComponent.d.ts' declared by the module 'AppModule in C:/Users/huajinso/sakura/src/app/app.module.ts'. Please add a @Pi pe/@Directive/@Component annotation.
Using version 0.8.1 makes everything work again. We had same issue with AOT....and also after we upgraded to 4.0.0 - see my other comment #157
Working on it!
@adamkundrat Thank for suggestion. I roll back to 0.8.1. It resolves this issue. But I have to use ImageCropperModule instead of ImageCropperComponent in @NgModule to avoid duplicate declaration issue.
Should be fixed in 0.8.4
I think it is still not working. I get this error
ERROR in Unexpected module 'ImageCropperModule in /Angular2/node_modules/ng2-img-cropper/src/imageCropperModu le.d.ts' declared by the module 'SharedModule in /shared.module.ts'. Please add a @Pip e/@Directive/@Component annotation.
ng serve works but when i try:
ng build --aot --prod --env=prod
it fails
Same issue here, using 0.8.8 (Also tried 0.8.1 and 0.8.4)
Is there any progress on this? It is still failing for me too. Tried 0.9, 0.8.1
Any update / or thoughts on how to work around this? Still seeing with 0.10.4...
After upgrading to 0.8.2 production build with AoT in Angular CLI, it throws the below error:
ERROR in Unexpected value 'ImageCropperModule in /node_modules/ng2-img-cropper/index.js' imported by the module 'FileUploadModule in /src/app/shared/file-upload/file-upload.module.ts'. Please add a @NgModule annotation. ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '\src' @ ./src/main.ts 4:0-74 @ multi ./src/main.ts
Can you please have a look?