在将应用程序从角度5迁移到6之后,在运行 ng 时会出现以下错误。
架构验证失败,出现以下错误: 数据路径“”不应该有额外的属性(项目)。 错误: 架构验证失败,出现以下错误: 数据路径“”不应该有额外的属性(项目)。 (.../TemplateApp/me-cmf-web-template-angle/node _ module/@angle-devkit/core/src/workspace/workspace.js: 210:42) 在 MergeMapSubscriber. _ tryNext (/.../me-cmf-web-template-angle/node _ module/@angle-devkit/core/node _ module/rxjs/Internal/Operator/mergeMap.js: 65:27) 在 MergeMapSubscriber._ next (.../me-cmf-web-template-angle/node _ module/@angle-devkit/core/node _ module/rxjs/Internal/Operator/mergeMap.js: 55:18) Http://www.mergeMapSubscriber.next/home/training/Attinad _ Projects/TemplateApp/me-cmf-web-template-angle/node _ module/@angle-devkit/core/node _ module/rxjs/Internal/Subscriber.js: 64:18) 地址: MergeMapSubscriber.notifyNext (.../TemplateApp/me-cmf-web-template-angle/node _ module/@angle-devkit/core/node _ module/rxjs/Internal/Operator/mergeMap.js: 84:26) 在 InnerSubscriber._ next (.../me-cmf-web-template-angle/node _ module/@angle-devkit/core/node _ module/rxjs/Internal/InnerSubscriber.js: 25:21) Http://www.innerSubscriber.next (/.../me-cmf-web-template-angle/node _ module/@angle-devkit/core/node _ module/rxjs/Internal/Subscriber.js: 64:18) 在 MapSubscriber. _ next (.../me-cmf-web-template-angle/node _ module/@angle-devkit/core/node _ module/rxjs/Internal/Operator/map.js: 52:26) Subscriber.next (/.../me-cmf-web-template-angle/node _ module/@angle-devkit/core/node _ module/rxjs/Internal/Subscriber.js: 64:18) 在 Switch MapSubscriber.notifyNext (.../me-cmf-web-template-angle/node _ module/@angle-devkit/core/node _ module/rxjs/Internal/Operator/switchMap.js: 77:26)
我假设错误出现在. angular.json 文件中,我将该文件重命名为. angle-cli. json。
我的. angular.json 文件如下:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "mediaweb"
},
"apps": [{
"root": "src",
"outDir": "dist/browser",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.scss",
"../node_modules/owl.carousel/dist/assets/owl.carousel.css",
"../node_modules/owl.carousel/dist/assets/owl.theme.default.css",
"../node_modules/video.js/dist/video-js.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/owl.carousel/dist/owl.carousel.js",
"../node_modules/video.js/dist/ie8/videojs-ie8.js",
"../node_modules/video.js/dist/video.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.dev.ts",
"prod": "environments/environment.prod.ts"
}
},
{
"platform": "server",
"root": "src",
"outDir": "dist/server",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.server.ts",
"test": "test.ts",
"tsconfig": "tsconfig.server.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.scss"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.dev.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [{
"project": "src/tsconfig.app.json",
"exclude": ["**/node_modules/**", "**/UI/**"]
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"component": {}
}
}
我应该重新构造 json 文件吗。
任何帮助都可以。