MegaPixImage fails for strict-di
See original GitHub issueI’m using ES6 with webpack and strict di.
The error I’m getting after importing ‘uiCropper’ is:
Error: [$injector:strictdi] MegaPixImage is not using explicit annotation and cannot be invoked in strict mode
even though MegaPixImage has nothing to do with angular. Any thoughts?
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
ng-strict-di throwing error even though no DI is used
ng-strict-di tells angularjs to initialize the dependency injector in strict mode. That is, you have to declare the injection like this:
Read more >AngularJS: Error Reference: strictdi - $injector
This error occurs when attempting to invoke a function or provider which has not been explicitly annotated, while the application is running with...
Read more >Sanity checking with ng-strict-di - Packt Subscription
The ng-strict-di directive is new and extremely simple to understand. When declaring the parent DOM node for your application, if ng-strict-di is included ......
Read more >Sanity checking with ng-strict-di - O'Reilly
If you try to load the page in your browser, you will be greeted with the following error: Error: [$injector:strictdi] function($provide) is not...
Read more >Angular 1.5+ with dependency injection and uglifyjs
ng-strict-di will basically fails anytime it finds an implicit declaration. Make sure to put that into your main Angular template.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found the issue. Your module definition is actually exporting the MegaPixImage function for some reason.
I was doing:
import uiCropper from 'ui-cropper';
but uiCropper in this context is not
uiCropper
, it is actuallyMegaPixImage
. I guess you have to review your module definitions.feel free to make PR