Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug: "File './tsconfig-base' not found" or "Cannot read file 'src/src/src/src/tsconfig-base.json'" in alpha (after ProjectService PR?) #7246

Closed
@jakebailey

Description

@jakebailey

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Issue Description

I bumped TypeScript up to the latest ts-eslint alpha to try and test out the new project service. However, I went to run a "before" benchmark and noticed that ts-eslint fails to load the configuration / tsconfig we have in the repo already, even before going to change the config.

Running eslint, I get this for each file:

/home/jabaile/work/TypeScript/src/typingsInstallerCore/_namespaces/ts.server.ts
  0:0  error  Parsing error: File './tsconfig-base' not found

/home/jabaile/work/TypeScript/src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts
  0:0  error  Parsing error: File './tsconfig-base' not found

/home/jabaile/work/TypeScript/src/typingsInstallerCore/_namespaces/ts.ts
  0:0  error  Parsing error: File './tsconfig-base' not found

/home/jabaile/work/TypeScript/src/typingsInstallerCore/typingsInstaller.ts
  0:0  error  Parsing error: File './tsconfig-base' not found

/home/jabaile/work/TypeScript/src/watchGuard/watchGuard.ts
  0:0  error  Parsing error: File './tsconfig-base' not found

✖ 576 problems (576 errors, 0 warnings)

Modifying our tsconfig-eslint base to instead try an explicit .json extension nets:

/home/jabaile/work/TypeScript/src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts
  0:0  error  Parsing error: Cannot read file 'src/src/src/src/tsconfig-base.json'

/home/jabaile/work/TypeScript/src/typingsInstallerCore/_namespaces/ts.ts
  0:0  error  Parsing error: Cannot read file 'src/src/src/src/tsconfig-base.json'

/home/jabaile/work/TypeScript/src/typingsInstallerCore/typingsInstaller.ts
  0:0  error  Parsing error: Cannot read file 'src/src/src/src/tsconfig-base.json'

/home/jabaile/work/TypeScript/src/watchGuard/watchGuard.ts
  0:0  error  Parsing error: Cannot read file 'src/src/src/src/tsconfig-base.json'

✖ 576 problems (576 errors, 0 warnings)

I suspect that maybe something regressed in said ProjectService change, but I can't be sure.

Reproduction Repository Link

https://github.com/jakebailey/TypeScript/tree/eslint-v6-alpha

Repro Steps

  1. clone the repo
  2. npm ci
  3. npx eslint .

Versions

package version
@typescript-eslint/eslint-plugin 6.0.1-alpha.28
@typescript-eslint/parser 6.0.1-alpha.28
@typescript-eslint/scope-manager 6.0.1-alpha.28
@typescript-eslint/typescript-estree 6.0.1-alpha.28
@typescript-eslint/type-utils 6.0.1-alpha.28
@typescript-eslint/utils 6.0.1-alpha.28
TypeScript 5.1.6
ESLint 8.45.0
node 20.4.0

Metadata

Metadata

Labels

accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions