Warning when building CLI app in prod mode for mat-menu
See original GitHub issueafter the update from angular material 5 to 6 when i try to build with “–prod” flag i give different warning such:
"export ‘MAT_FORM_FIELD_DEFAULT_OPTIONS’ (imported as ‘i9’) was not found in ‘@angular/material/form-field’
WARNING in ./node_modules/@angular/material/tabs/typings/index.ngfactory.js 153:374-400 "export ‘_MAT_INK_BAR_POSITIONER’ (imported as ‘i1’) was not found in ‘@angular/material/tabs’
WARNING in ./src/app/app.module.ngfactory.js 90:13675-13704 "export ‘MAT_CHIPS_DEFAULT_OPTIONS’ (imported as ‘i61’) was not found in ‘@angular/material/chips’
this make the page broken on the browser and not load at all, with: ERROR Error: StaticInjectorError[t -> t]: StaticInjectorError(Platform: core)[t -> t]: NullInjectorError: No provider for t!
if i switch back to older version of Angular Material seems all work fine.
PACKAGE.json
{
"name": "iptvWeb",
"version": "0.0.6",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "6.0.0",
"@angular/cdk": "^6.0.1",
"@angular/common": "6.0.0",
"@angular/compiler": "6.0.0",
"@angular/core": "6.0.0",
"@angular/flex-layout": "github:angular/flex-layout-builds",
"@angular/forms": "6.0.0",
"@angular/http": "6.0.0",
"@angular/material": "^6.0.1",
"@angular/platform-browser": "6.0.0",
"@angular/platform-browser-dynamic": "6.0.0",
"@angular/router": "6.0.0",
"@ng-bootstrap/ng-bootstrap": "^1.1.2",
"@ngx-progressbar/core": "^4.3.0",
"@ngx-progressbar/http": "^4.3.0",
"@webcomponents/custom-elements": "^1.1.0",
"ag-grid": "^17.1.1",
"ag-grid-angular": "^17.1.0",
"angular-font-awesome": "^3.1.2",
"angular-in-memory-web-api": "^0.5.4",
"angular2-virtual-scroll": "^0.3.2",
"angularfire2": "^5.0.0-rc.5-next",
"bootstrap": "^4.1.1",
"core-js": "^2.5.6",
"crypto-js": "^3.1.9-1",
"dashjs": "^2.6.8",
"firebase": "^4.13.1",
"flex-layout-srcs": "5.0.0-beta.14",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"hls.js": "^0.8.9",
"ng-sidebar": "^7.1.0",
"ngx-flickity": "0.0.9",
"ngx-infinite-scroll": "^0.8.4",
"ngx-scrollbar": "^1.5.7",
"promise-polyfill": "7.1.0",
"rxjs": "^6.1.0",
"rxjs-compat": "^6.1.0",
"stream": "0.0.2",
"timers": "^0.1.1",
"videogular2": "^6.1.1",
"xml2js": "^0.4.19",
"xmltv": "^0.3.0",
"xmltv-parser": "^1.0.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.0",
"@angular/cli": "^6.0.0",
"@angular/compiler-cli": "6.0.0",
"@angular/language-service": "6.0.0",
"@types/core-js": "^0.9.46",
"@types/crypto-js": "^3.1.39",
"@types/jasmine": "^2.8.7",
"@types/jasminewd2": "~2.0.2",
"@types/node": "^6.0.109",
"codelyzer": "^4.3.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^2.0.2",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "^1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "2.7.2"
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:16 (3 by maintainers)
Top GitHub Comments
From my own testing, things seems to works fine up to version 6.3.1 of @angular/material. If
build-optimizer
is enabled, things start to break in 6.3.2, then more breaks in 6.3.3. Tested with @angular-devkit 0.6.8 and webpack 4.8.3.6.3.2 breaks the Moment date adapter Building gives a warning:
With Chrome giving the error:
6.3.3 additionally breaks menus: Build warning:
Chrome error:
UPDATE: This seems to have been a regression in angular-devkit somewhere between 0.6.3 and 0.6.8 that has since been fixed. Latest angular/material works fine for me after updating devkit to 0.7.1
@cusher Yes, moving to the 0.7.1 has fixed it also here. Frustrating. Thanks for the input.