gpt4 book ai didi

netbeans - app.component.ts 不在 tsconfig.json 定义的项目中

转载 作者:搜寻专家 更新时间:2023-10-30 21:24:28 25 4
gpt4 key购买 nike

所以我得到这个错误:

File C:/wamp/www/angular2_demo/GiphySearch/src/app/app.component.ts is not in project defined by C:/wamp/www/angular2_demo/GiphySearch/e2e/tsconfig.json

我的文件夹结构是

/
/e2e/tsconfig.json
/src
(others)

tsconfig.js 有这个内容

{
"compileOnSave": false,
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"mapRoot": "",
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
"noImplicitAny": false,
"rootDir": ".",
"sourceMap": true,
"sourceRoot": "/",
"target": "es5"
}
}

我尝试将 rootDirsourceRoot 更改为定义为 ../../src/src 但没有任何效果。应该如何正确配置?

最佳答案

NetBeans 项目可能设置为将整个 ng2-cli 目录索引为单个源根目录,这会破坏此插件,因为它下面有多个 tsconfig.json 文件(一个在 src/和一个在 e2e/).

在项目属性中,在“源”类别下,将“站点根文件夹”和“源文件夹”设置为 src。 (如果您也想编辑“Selenium 测试文件夹”,也可以将其设置为 e2e)。

关于netbeans - app.component.ts 不在 tsconfig.json 定义的项目中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39036824/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com