升级到Angular 5时,文件'src/app/app.component.spec.ts'不是Typescript项目的一部分 [英] File 'src/app/app.component.spec.ts' is not part of Typescript project while upgrading to Angular 5
本文介绍了升级到Angular 5时,文件'src/app/app.component.spec.ts'不是Typescript项目的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
升级到Angular 5时,文件'src/app/app.component.spec.ts'不是Typescript项目'src/tsconfig.app.json'的一部分
File 'src/app/app.component.spec.ts' is not part of Typescript project 'src/tsconfig.app.json' while upgrading to Angular 5
我们已经按照所有说明从4号角转换项目,但是正在努力克服这一点-任何人有任何想法吗?
We have followed all the instructions for converting our project from angular 4 but are pulling out our hair over this one - anyone have any ideas?
我们正在从tslint收到此错误...
We are getting this error from tslint...
推荐答案
通过将所有文件"条目替换为排除"条目来更改.angular-cli.json的棉绒"部分...
Change the "lint" section of .angular-cli.json by replacing all of the "files" entries with "exclude" entries...
"lint": [
{
"project": "src/tsconfig.app.json",
"files": "src/**/*.ts"
},
{
"project": "src/tsconfig.spec.json",
"files": "src/**/*.spec.ts"
},
{
"project": "e2e/tsconfig.e2e.json",
"files": "e2e/**/*.ts"
}]
成为
"lint": [
{
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}]
这篇关于升级到Angular 5时,文件'src/app/app.component.spec.ts'不是Typescript项目的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文