Несколько дней назад я заметил, что мой проект Angular with Angular CLI перестал давать мне заметную строку ошибки.Вместо этого я получаю строки из main.js
, vendor.js
и всех других файлов скомпилированного кода.В моем терминале он выдает «нормальную» ошибку и правильную строку в не скомпилированном коде.
Также console.log()
в консоли браузера происходит из скомпилированного кода.Я не могу понять, что изменилось, и если это было сделано намеренно?Я проверил свою среду, и она работает в режиме разработки.Я обновил Angular CLI и сам Angular, но безрезультатно.
Я запускаю эту команду, чтобы открыть localhost:
ng serve --open
Это мой package.json:
{
"name": "fqm19",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"deploy": "node deploy"
},
"private": true,
"dependencies": {
"@angular/animations": "^8.0.2",
"@angular/cdk": "^7.3.7",
"@angular/common": "~8.0.2",
"@angular/compiler": "~8.0.2",
"@angular/core": "~8.0.2",
"@angular/fire": "^5.2.1",
"@angular/forms": "~8.0.2",
"@angular/platform-browser": "~8.0.2",
"@angular/platform-browser-dynamic": "~8.0.2",
"@angular/router": "~8.0.2",
"angular-sortablejs": "^2.7.0",
"angular2-fontawesome": "^5.2.1",
"bootstrap": "^4.3.1",
"cookieconsent": "^3.1.0",
"core-js": "^2.5.4",
"firebase": "^6.1.1",
"font-awesome": "^4.7.0",
"ng2-adsense": "^5.4.2",
"ngx-bootstrap": "^4.0.1",
"ngx-cookieconsent": "^2.2.0",
"ngx-toastr": "^10.0.4",
"pdfmake": "^0.1.55",
"rxjs": "~6.5.2",
"sortablejs": "^1.9.0",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.800.0",
"@angular/cli": "~8.0.3",
"@angular/compiler-cli": "~8.0.2",
"@angular/language-service": "~8.0.2",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.1",
"ftp-deploy": "^2.3.3",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.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",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.4.5"
}
}
Любой может сброситьсвет на это изменение?Или я что-то пропустил?О, да, я выбросил все свои модули узлов и переустановил все.Все тот же.
Angular.json:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"fqm19": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/ads.txt",
"src/assets"
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/cookieconsent/build/cookieconsent.min.css",
"node_modules/ngx-toastr/toastr.css",
"src/styles.css",
"node_modules/font-awesome/css/font-awesome.css"
],
"scripts": [
"node_modules/cookieconsent/build/cookieconsent.min.js"
],
"es5BrowserSupport": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "fqm19:build"
},
"configurations": {
"production": {
"browserTarget": "fqm19:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "fqm19:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"fqm19-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "fqm19:serve"
},
"configurations": {
"production": {
"devServerTarget": "fqm19:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "fqm19",
"schematics": {
"@schematics/angular:component": {
"styleext": "css"
}
}
}