ERROR Error: No provider for e!
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?
This is an issue in angular/core (see https://github.com/angular/angular/issues/19267) and was already fixed in v4.4.3
Thnx Bro , What are you think is good idea to go to 4.4.3 i am now in 4.4.2
What npm should i type to get the 4.4.3 can you help me
Run npm update
Thnx
Closing as the issue was determined to be in angular/core
by the way 4.4.3 is angular version or what it is? @josephperrott @George35mk
I have fixed this error and yes 4.4.3 in the angular version.
how do i change the angular version? @George35mk
try this
npm outdatednpm update
OR
` npm uninstall -g @angular/cli
npm uninstall -g angular/cli
npm cache clean
npm install -g @angular/cli@latest `
Ok :)
Yeah i ll try and thanks for the reply @George35mk
when i did npm cache clean i am getting errors @George35mk
what errors show me
You want the latest version of angular CLI ?? You have angular material and if yes what version ??
no the errors are cleared but this No provider for e! is not solved @George35mk
Post your package.json you have some older version or this is some module or you must update all your dependencies
On new version of angular thats solved
here's the package.json file @George35mk { "name": "app", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@agm/core": "^1.0.0-beta.1", "@angular/animations": "^4.2.4", "@angular/common": "^4.2.4", "@angular/compiler": "^4.2.4", "@angular/core": "^4.2.4", "@angular/forms": "^4.2.4", "@angular/http": "^4.2.4", "@angular/platform-browser": "^4.2.4", "@angular/platform-browser-dynamic": "^4.2.4", "@angular/router": "^4.2.4", "@ngui/scrollable": "^0.9.1", "@ngx-translate/core": "^8.0.0", "@types/googlemaps": "^3.29.2", "@types/xlsx": "0.0.36", "@webcomponents/custom-elements": "^1.0.0", "angular2-fontawesome": "^0.9.3", "angular2-indexeddb": "^1.2.1", "angular2-logger": "^0.6.0", "angular2-prettyjson": "^2.0.6", "angular2-select": "^1.0.0-beta.3", "angular2-useful-swiper": "^5.0.0", "clarity-angular": "^0.10.4", "clarity-icons": "^0.10.4", "clarity-ui": "^0.10.4", "core-js": "^2.4.1", "crypto-js": "^3.1.9-1", "font-awesome": "^4.7.0", "moment": "^2.18.1", "ng-pick-datetime": "^5.0.0-beta.11", "ng2-dnd": "^4.1.0", "ng2-file-upload": "^1.2.1", "ng2-img-cropper": "^0.9.0", "powerbi-client": "^2.4.1", "rxjs": "^5.4.2", "swiper": "^3.4.2", "textcomplete": "^0.14.4", "ts-xlsx": "0.0.11", "zone.js": "^0.8.18" }, "devDependencies": { "@angular/cli": "1.3.0", "@angular/compiler-cli": "^4.2.4", "@angular/language-service": "^4.2.4", "@types/googlemaps": "^3.29.2", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "~3.1.1", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "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.4.2" } }
Type this commad
ng --version
Show me what you see
If you see 1.5.2
Type this command