question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MegaPixImage fails for strict-di

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
vjoaocommented, Dec 7, 2016

Found the issue. Your module definition is actually exporting the MegaPixImage function for some reason.

I was doing:

import uiCropper from 'ui-cropper';

angular.module('app', [
...
uiCropper
]

but uiCropper in this context is not uiCropper, it is actually MegaPixImage. I guess you have to review your module definitions.

0reactions
CrackerakiUAcommented, Oct 29, 2019

feel free to make PR

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found