angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.76k stars 11.98k forks source link

Ng error serves #16230

Closed Mark0liveira closed 4 years ago

Mark0liveira commented 4 years ago

🐞 Bug report

Command (mark with an x)

Is this a regression?

Yes, the previous version in which this bug was not present was: .... ### Description A clear and concise description of the problem... I migrated the angle from version 6 to version 8, as suggested last week. I followed the steps of: https://update.angular.io/. I performed all the necessary procedures, and the problems I encountered here in the community. ![image](https://user-images.githubusercontent.com/47141652/69174841-5ba9de80-0ae1-11ea-9bb4-b5a0349e562a.png) But I have a problem now, ng serve is compiling now without any errors, but is giving errors in the browser console. Package: { "name": "gestran-software", "version": "2.2.0-0", "license": "NONE", "scripts": { "ng": "ng", "start": "ng serve --host=0.0.0.0", "db": "json-server --watch ./src/db-mock/db.json --id=CodigoRastreamento", "build": "ng build", "build-css": "ng build --extract-css true", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "bundle-report": "webpack-bundle-analyzer dist/stats.json", "build-prod": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --prod --configuration=production", "build-hom": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --prod --configuration=hom", "build-dev": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --prod --configuration=dev", "docs:build": "stylemark -i ./src -o ./docs -c ./stylemark.config.yml", "docs:start": "stylemark -i ./src -o ./docs -c ./stylemark.config.yml -w" }, "private": true, "dependencies": { "@agm/core": "^1.0.0-beta.2", "@angular/animations": "^6.1.0", "@angular/cdk": "^8.2.3", "@angular/common": "^6.1.0", "@angular/core": "^8.2.14", "@angular/fire": "^5.2.3", "@angular/flex-layout": "^7.0.0-beta.24", "@angular/forms": "^6.1.0", "@angular/material": "^8.2.3", "@angular/material-moment-adapter": "6.4.7", "@angular/platform-browser": "6.1.10", "@angular/platform-browser-dynamic": "^8.2.14", "@angular/platform-server": "^6.1.0", "@angular/router": "6.1.10", "@aspnet/signalr": "^1.1.0", "@firebase/app": "^0.4.24", "@fortawesome/angular-fontawesome": "^0.5.0", "@fortawesome/fontawesome-svg-core": "^1.2.25", "@fortawesome/free-brands-svg-icons": "^5.11.2", "@fortawesome/free-solid-svg-icons": "^5.11.2", "@fortawesome/pro-light-svg-icons": "^5.11.2", "@fortawesome/pro-regular-svg-icons": "^5.11.2", "@fortawesome/pro-solid-svg-icons": "^5.11.2", "@ncstate/sat-popover": "^1.0.0", "@ng-select/ng-select": "^2.13.0", "@ngrx/effects": "6.1.0", "@ngrx/router-store": "6.1.0", "@ngrx/store": "^8.5.1", "@ngu/carousel": "^1.5.4", "@nguniversal/aspnetcore-engine": "^8.1.1", "@nguniversal/express-engine": "^6.1.0", "@ngx-translate/core": "8.0.0", "@types/decimal.js": "^7.4.0", "@types/devextreme": "^16.2.1", "@types/googlemaps": "^3.30.11", "@types/moment": "2.13.0", "@types/xlsx": "0.0.36", "angular-io-datepicker": "1.3.1", "angular-moment-picker": "0.10.1", "angular-resize-event": "^0.4.4", "angular-smooth-scrollbar": "^7.2.0", "angular-sortablejs": "2.0.6", "angular-split": "0.2.6", "angular2-text-mask": "8.0.4", "applicationinsights-js": "^1.0.8", "cep-promise": "2.0.5", "chalk": "^2.4.1", "chart.js": "^2.7.3", "core-js": "2.4.1", "countup.js": "1.8.5", "cropperjs": "^1.3.5", "devextreme": "18.1.4", "devextreme-angular": "18.1.4", "devextreme-intl": "18.1.4", "drag-drop-touch-polyfill": "^1.0.0", "file-saver": "^2.0.2", "firebase": "^7.4.0", "flexboxgrid": "^6.3.1", "font-awesome": "^4.7.0", "hammerjs": "2.0.8", "highlight.js": "9.12.0", "hopscotch": "0.3.1", "idb": "^2.1.3", "js-marker-clusterer": "^1.0.0", "jspdf": "1.3.5", "lodash": "^4.17.11", "moment": "2.22.2", "ng-drag-drop": "^5.0.0", "ng-pick-datetime": "^5.2.6", "ng-recaptcha": "^3.0.5", "ng2-carouselamos": "3.2.0", "ng2-charts": "1.6.0", "ng2-currency-mask": "^4.4.1", "ng2-datepicker": "2.1.3", "ng2-password-strength-bar": "1.1.3", "ng2-select": "1.2.0", "ngrx-store-freeze": "0.2.0", "ngx-br": "^9.9.9", "ngx-carousel": "1.3.5", "ngx-color-picker": "^6.0.0", "ngx-currency-mask": "^4.3.2", "ngx-device-detector": "^1.1.7", "ngx-loading": "1.0.14", "ngx-mask": "^2.0.3", "ngx-openlayers": "^0.8.20", "ngx-pagination": "3.0.3", "ngx-utilities": "0.0.26", "normalize.css": "7.0.0", "npm": "^6.4.1", "numeral": "2.0.6", "powerbi-client": "^2.5.1", "reselect": "3.0.1", "rxjs": "^6.3.3", "rxjs-compat": "^6.3.3", "smooth-scrollbar": "7.4.1", "sortablejs": "1.6.0", "stringformat": "0.0.5", "stylelint": "^9.4.0", "stylelint-config-recommended-scss": "^3.2.0", "stylelint-config-standard": "^18.2.0", "stylelint-order": "^1.0.0", "stylelint-scss": "^3.3.0", "sweetalert": "^2.1.2", "talkjs": "^0.6.0", "ts-xlsx": "0.0.11", "tslib": "^1.10.0", "web-animations-js": "2.3.1", "xlsx": "^0.15.2", "zone.js": "^0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "^0.803.19", "@angular/cli": "^8.3.19", "@angular/compiler": "^8.2.14", "@angular/compiler-cli": "^8.2.14", "@angular/language-service": "^6.1.0", "@ngrx/store-devtools": "6.1.0", "@types/highlight.js": "9.1.9", "@types/jasmine": "2.5.53", "@types/jasminewd2": "2.0.2", "@types/lodash": "^4.14.117", "@types/node": "^10.12.0", "@types/quill": "1.3.0", "cldr-data": "^32.0.1", "codelyzer": "^5.0.1", "globalize": "^1.3.0", "gulp-sass": "^4.0.2", "jasmine-core": "2.6.2", "jasmine-spec-reporter": "4.1.0", "karma": "~3.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~1.1.2", "karma-jasmine-html-reporter": "^0.2.2", "node-sass": "^4.13.0", "protractor": "~5.4.0", "quill": "1.3.0", "stylemark": "^3.1.3", "ts-node": "~7.0.0", "tslint": "5.3.2", "typescript": "^3.4.5", "webpack": "^4.41.2", "webpack-bundle-analyzer": "^2.11.1" } } ![image](https://user-images.githubusercontent.com/47141652/69175334-51d4ab00-0ae2-11ea-8e1e-796a77825a8e.png) ## πŸ”¬ Minimal Reproduction

πŸ”₯ Exception or Error





🌍 Your Environment





![image](https://user-images.githubusercontent.com/47141652/69175193-0fab6980-0ae2-11ea-8f82-1ba56de4c194.png)

Anything else relevant?

Mark0liveira commented 4 years ago

can anyone help me?

Mark0liveira commented 4 years ago

I also ran ng update @ angular / cli @ angular / core, but the result was:

image

Everything is updated, but when running ng update:

image

All these libraries are up to date ... Another thing I tried from other issues open here was to run ng update --all:

image

Is any action missing from me?

alan-agius4 commented 4 years ago

Can you please provide the output of ng version?

Mark0liveira commented 4 years ago

Now I was able to compile successfully, but it is giving some errors in my application, do you recognize any of them?

For example this screen:

image

My code:

`import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { MatTabGroup } from '@angular/material'; import { Location } from '@angular/common';

@Component({ selector: 'gerenciar-abastecimentos', templateUrl: './gerenciar-abastecimentos.component.html', styleUrls: ['./gerenciar-abastecimentos.component.scss'] }) export class GerenciarAbastecimentosComponent implements OnInit {

public title = 'Abastecimentos'; @ViewChild(MatTabGroup, {static: false}) matTabGroup: MatTabGroup; constructor(private activatedRoute: ActivatedRoute, private router: Router, private location: Location) { }

changeRoute() { switch (this.matTabGroup.selectedIndex) { case 0: this.location.replaceState('apps/combustivel/gerenciar-abastecimentos/externo'); break; case 1: this.location.replaceState('apps/combustivel/gerenciar-abastecimentos/interno'); break; } }

ngOnInit() { const tab = this.activatedRoute.snapshot.url.length > 0 ? this.activatedRoute.snapshot.url[0].path : ''; switch (tab) { case 'externo': this.matTabGroup.selectedIndex = 0; break; case 'interno': this.matTabGroup.selectedIndex = 1; break; } } }`

NG VERSION

image

filipesilva commented 4 years ago

It might be related to the forms warning that also shows up in the log.

This issue tracker is not suitable for support requests though, please repost your issue on StackOverflow using tag angular-cli or angular.

If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.

angular-automatic-lock-bot[bot] commented 4 years ago

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.