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.

ERROR Error: No provider for e!

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

The expected behavor is to show the modal

What is the current behavior?

when i click the button a modal should PopUp and i get this error

ERROR Error: No provider for e!
    at C (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at O (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at t._throwOrNull (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at t._getByKeyDefault (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at t._getByKey (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at t.get (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at Ne (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at t.get (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at gn (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at fn (vendor.e889734c5a40aee1e88f.bundle.js:1)
v @ vendor.e889734c5a40aee1e88f.bundle.js:1

But When run ng serve all is ok the md-dialoge is works , But if i run the app in --prod mode i have this error, I dont know what to Do??

What are the steps to reproduce?

Providing a Plunker (or similar) is the best way to get the team to see your issue. Plunker template: https://goo.gl/DlHd6U

i have a button that opens the dialoge

dialoge.component.html

<div>
  <form [formGroup]="registerPharmacy" novalidate (ngSubmit)="dialogRef.close(registerPharmacy.value)" ngNativeValidate>
    <div fxLayout="column" fxLayoutGap="10px" fxLayoutAlign="center center" style="padding-top:10px;">
      
      <div fxFlex="10px"></div>
      <div fxFlex="20px" style="font-weight: 300;font-size: 20px;color: blueviolet;">
        Πρόσεχε που στέλνεις τα email.
      </div>
      <div fxFlex="10px"></div>

      <md-input-container style="width:100%;">
        <input mdInput type="email" ngModel pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" 
        maxlength="50" formControlName="email"  name="email" placeholder="Email" required>

        <md-hint *ngIf="registerPharmacy.get('email').touched" >
          <span class="error_hint" *ngIf="registerPharmacy.get('email').hasError('pattern')">
              *Το email δεν είναι έγκυρο.
          </span>
        </md-hint>

      </md-input-container>

      <md-input-container fxFlex="100" style="width:100%;">
        <input mdInput fxFlex="100" type="password" ngModel minlength="8" maxlength="30" name="password"
          pattern="" formControlName="password"
          placeholder="Password" required style="width:100%;"
        >
        <md-hint *ngIf="registerPharmacy.get('password').touched" >
          <span class="error_hint" *ngIf="registerPharmacy.get('password').hasError('minlength')">
              *Ο κωδικός είναι πολλή μικρός, τουλάχιστον 8 ψηφία.
          </span>
        </md-hint>
      </md-input-container>

      <md-input-container fxFlex="100" style="width:100%;">
        <input mdInput fxFlex="100" type="password" ngModel minlength="8" maxlength="30" name="password_again"
          pattern="" formControlName="password_again"
          placeholder="Password again" required style="width:100%;">
        <md-hint *ngIf="registerPharmacy.get('password_again').touched" >
          <span class="error_hint" *ngIf="registerPharmacy.get('password_again').hasError('minlength')">
              *Ο κωδικός είναι πολλή μικρός, τουλάχιστον 8 ψηφία.
          </span>
        </md-hint>
      </md-input-container>

      <div fxLayout="row" fxLayoutGap="10px" fxLayoutAlign="center center" style="padding:0px; min-width: 100%;">
        <md-input-container style="width:100%;">
          <input mdInput  type="text" ngModel minlength="4" maxlength="30" formControlName="first_name" name="first_name" 
          placeholder="Όνομα" required>

          <md-hint *ngIf="registerPharmacy.get('first_name').touched" >
            <span class="error_hint" *ngIf="registerPharmacy.get('first_name').hasError('minlength')">
                *Το όνομα δέν είναι έγκυρο.
            </span>
          </md-hint>
        </md-input-container>

        <md-input-container style="width:100%;">
          <input mdInput type="text" ngModel minlength="5" maxlength="30" formControlName="last_name" name="last_name" 
          placeholder="Επώνυμο" required>

          <md-hint *ngIf="registerPharmacy.get('last_name').touched" >
            <span class="error_hint" *ngIf="registerPharmacy.get('last_name').hasError('minlength')">
                *Το Επώνυμο δέν είναι έγκυρο.
            </span>
          </md-hint>

        </md-input-container>
      </div>

      <md-input-container style="width:100%;">
        <input mdInput type="text" ngModel pattern="[0-9]{10}" maxlength="10" name="phone"
          placeholder="Τηλεφωνο επικοινωνίας" formControlName="phone" required>
      </md-input-container>
      

      <button [disabled]="registerPharmacy.invalid || !registerPharmacy.dirty" md-raised-button color="primary" style="width: 100%;">Γίνε μέλος</button>

      <div fxFlex="" style="font-size: 12px;">
        Δημιουργώντας λογαριασμό αποδέχεσαι τους <a routerLink="/"> όρους χρήσης</a>.
      </div>

      <div fxFlex="" style="font-size: 15px;">
        <a href="">Εχεις λογαριασμό συνδέσου? </a>
      </div>

    </div>
  </form>

</div>
  

app.module.ts

// Login and register pharmacists
import { DialLoginPharmacistComponent } from './Partials/dial-login-pharmacist/dial-login-pharmacist.component';
import { DialRegisterPharmacistComponent } from './Partials/dial-register-pharmacist/dial-register-pharmacist.component';


 providers: [
    HttpModule,
    MediatorService,
    ApiService,
    ApiAgentsService,
    ApiPharmacistsService,
    AuthService,
    ClientService,
    FirebaseService,
    AngularFireAuth,
    AngularFireDatabase,
    CustomSnackbarComponent
],
entryComponents: [
    DialLoginPharmacistComponent ,
    DialRegisterPharmacistComponent ,
],

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"dependencies": {
    "@angular/animations": "^4.4.2",
    "@angular/cdk": "^2.0.0-beta.10",
    "@angular/common": "^4.4.2",
    "@angular/compiler": "^4.4.2",
    "@angular/core": "^4.4.2",
    "@angular/flex-layout": "^2.0.0-rc.1",
    "@angular/forms": "^4.4.2",
    "@angular/http": "^4.4.2",
    "@angular/material": "^2.0.0-beta.10",
    "@angular/platform-browser": "^4.4.2",
    "@angular/platform-browser-dynamic": "^4.4.2",
    "@angular/router": "^4.4.2",
    "angularfire2": "^4.0.0-rc0",
    "core-js": "^2.5.1",
    "firebase": "^4.3.1",
    "hammerjs": "^2.0.8",
    "rxjs": "^5.4.2",
    "zone.js": "^0.8.17"
  },
  "devDependencies": {
    "@angular/cli": "1.3.0",
    "@angular/compiler-cli": "^4.4.2",
    "@angular/language-service": "^4.4.2",
    "@types/jasmine": "^2.5.54",
    "@types/jasminewd2": "^2.0.3",
    "@types/node": "^6.0.88",
    "codelyzer": "~3.1.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "^1.7.1",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.3.2",
    "typescript": "~2.3.3"
  }

Is there anything else we should know?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:32 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
George35mkcommented, Dec 5, 2017

I have fixed this error and yes 4.4.3 in the angular version.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 8, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NullInjectorError: No provider for e! on Angular 7
I'm getting see error image here I have search other blogs and the solution that they recommend is to add the service on...
Read more >
NG0201: No provider for {token} found! - Angular
To fix the error ensure that your service is registered in the list of providers of an NgModule or has the @Injectable decorator...
Read more >
[Debugging] NullInjectorError: No provider for {Class}!
In this video, you'll learn what the error "NullInjectorError: No provider for {Class}!" means, how to debug it, and prevent it from ...
Read more >
Angular 7 StaticInjectorError NullInjectorError: No provider for ...
However, after upgrading to angular 7 I am starting to see this error during my app launch. (object): Error: StaticInjectorError(AppModule)[NavigationService -> ...
Read more >
Staticinjectorerror(platform core) e nullinjectorerror no ...
Staticinjectorerror(platform core) e nullinjectorerror no provider for e (After being deployed in firebase) ... Ionic app was working perfectly ...
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