#angular #web-worker
Вопрос:
Я получаю эту ошибку при сборке ng
Schema validation failed with the following errors:
Data path "" should NOT have additional properties(webWorkerTsConfig).
Какой-то процесс внес эту модификацию, я подозреваю, когда запускал веб-работника ng generate, но я не уверен. Я не понимаю, что делает эта часть angular.json, поэтому я опасаюсь просто удалить ее.
Немного предыстории: я добавил веб-работника в проект, который раньше был в Angular 6.
ng -v
_ _ ____ _ ___
/ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ | '_ / _` | | | | |/ _` | '__| | | | | | |
/ ___ | | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ __| |_|__, |__,_|_|__,_|_| ____|_____|___|
|___/
Angular CLI: 6.2.3
Node: 12.14.1
OS: win32 x64
Angular: undefined
...
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.8.3 (cli-only)
@angular-devkit/build-angular <error>
@angular-devkit/core 0.8.3 (cli-only)
@angular-devkit/schematics 0.8.3 (cli-only)
@angular/compiler-cli <error>
@schematics/angular 0.8.3 (cli-only)
@schematics/update 0.8.3 (cli-only)
rxjs 6.2.2 (cli-only)
typescript 2.9.2 (cli-only)
угловой.json:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"bluecost-rules-client": {
"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": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css",
"node_modules/datatables.net-dt/css/jquery.dataTables.css"
],
"scripts": [
"src/assets/w3ds.js",
"node_modules/jquery/dist/jquery.js"
],
"webWorkerTsConfig": "tsconfig.worker.json"
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": false,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"port": 8447,
"browserTarget": "bluecost-rules-client:build"
},
"configurations": {
"production": {
"browserTarget": "bluecost-rules-client:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "bluecost-rules-client: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": [
"tsconfig.app.json",
"tsconfig.spec.json",
"tsconfig.worker.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"bluecost-rules-client-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "bluecost-rules-client:serve"
},
"configurations": {
"production": {
"devServerTarget": "bluecost-rules-client:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"defaultProject": "bluecost-rules-client"
}