gpt4 book ai didi

angular - Protractor - 配置文件 'files' 中的 'tsconfig.json' 列表为空。 (18002)

转载 作者:行者123 更新时间:2023-12-04 15:50:25 25 4
gpt4 key购买 nike

我想在我的 Angular 中实现 e2e v5.x项目使用 protractor.js .但是当我运行命令时
ng e2e -s false
我在下面收到此错误 谁能告诉我如何解决此问题?

[15:58:11] E/launcher - Error: TSError: ⨯ Unable to compile TypeScript
The 'files' list in config file 'tsconfig.json' is empty. (18002)
at load (F:\Commutatus\yop-v3\node_modules\ts-node\src\index.ts:159:13)
at service (F:\Commutatus\yop-v3\node_modules\ts-node\src\index.ts:285:32)
at shouldIgnore (F:\Commutatus\yop-v3\node_modules\ts-node\src\index.ts:293:21)
at Object.require.extensions.(anonymous function) [as .ts] (F:\Commutatus\yop-v3\node_modules\ts-node\src\index.ts:302:11)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at F:\Commutatus\yop-v3\node_modules\protractor\node_modules\jasmine\lib\jasmine.js:84:5
[15:58:11] E/launcher - Process exited with error code 100

这是我的 tsconfig.json (位于 e2e 文件夹内)-
{
"compileOnSave": false,
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "../dist/out-tsc-e2e",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
]
}
}

最佳答案

使用"file"属性。希望对你有帮助。

{
"compilerOptions": {
"module": "commonjs",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true
},
"files": [
"core.ts",
"sys.ts",
"types.ts",
"scanner.ts",
"parser.ts",
"utilities.ts",
"binder.ts",
"checker.ts",
"emitter.ts",
"program.ts",
"commandLineParser.ts",
"tsc.ts",
"diagnosticInformationMap.generated.ts"
]
}

关于angular - Protractor - 配置文件 'files' 中的 'tsconfig.json' 列表为空。 (18002),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54072781/

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