After struggling for an hour on this issue, I am stuck.
The variables outDir
and rootDir
are set. However, the problem arises when only src
is included in include
, TypeScript shows the configuration via showConfig
, yet it's attempting to compile 4 files from build
instead of just the ones from src
.
I would greatly appreciate another set of eyes to review:
➜ git:(main) ✗ yarn tsc
error TS5055: Cannot write file './build/err/critical.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './build/err/err.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './build/err/index.d.ts' because it would overwrite input file.
error TS5055: Cannot write file './build/err/levels.d.ts' because it would overwrite input file.
Found 4 errors.
➜ git:(main) ✗ yarn tsc --showConfig
{
"compilerOptions": {
"lib": [
"esnext"
],
"module": "node12",
"target": "es2021",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"moduleResolution": "node12",
"noEmit": false,
"outDir": "./build",
"rootDir": "./src"
},
"files": [
"./src/array-async.ts",
"./src/array.ts",
"./src/async-event-emitter.ts",
"./src/console.ts",
"./src/gen-await.ts",
"./src/is-object.ts",
"./src/object.ts",
"./src/string.ts",
"./src/err/critical.ts",
"./src/err/err.ts",
"./src/err/index.ts",
"./src/err/levels.ts",
"./src/err/validation.ts"
],
"include": [
"src/**/*"
],
"exclude": [
"**/__tests__/**/*",
"build/**/*"
],
"compileOnSave": true
}