Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to find tsconfig files being extended with "ENOENT: no such file or directory, ..." #480

Closed
jeremymeng opened this issue Jan 26, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@jeremymeng
Copy link

we have a tsconfig.json file that extends another one ("../../../tsconfig.package"). Looks that knip is looking for the file /home/meng/git/jssdk/tsconfig.package but it should have include the ".json" extension

meng ➜ ~/git/jssdk/sdk/tables/data-tables (main) $ bunx knip
Analyzing workspace ....
Error loading /home/meng/git/jssdk/tsconfig.package
Reason: ENOENT: no such file or directory, open '/home/meng/git/jssdk/tsconfig.package'
meng ➜ ~/git/jssdk/sdk/tables/data-tables (main) $ l /home/meng/git/jssdk/tsconfig.package.json
/home/meng/git/jssdk/tsconfig.package.json
meng ➜ ~/git/jssdk/sdk/tables/data-tables (main) $ cat tsconfig.json
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: tsconfig.json
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ {
   2   │   "extends": "../../../tsconfig.package",
   3   │   "compilerOptions": {
   4   │     "outDir": "./dist-esm",
   5   │     "declarationDir": "./types",
   6   │     "lib": ["dom", "esnext"],
   7   │     "paths": {
   8   │       "@azure/data-tables": ["./src/index"],
   9   │     },
  10   │   },
  11   │   "exclude": ["node_modules", "types", "temp", "browser", "dist", "dist-esm", "./samples/**/*.ts"],
  12   │ }
@jeremymeng jeremymeng added the bug Something isn't working label Jan 26, 2024
@webpro
Copy link
Collaborator

webpro commented Jan 29, 2024

Are you using the latest version of Knip?

@jeremymeng
Copy link
Author

jeremymeng commented Jan 29, 2024

Are you using the latest version of Knip?

I did bunx knip@latest and got the same error.

@jeremymeng
Copy link
Author

bunx knip@latest -V
4.2.1

@webpro
Copy link
Collaborator

webpro commented Jan 29, 2024

Related: #420

You'll need to add the .json extension for Knip to find it, since this file is not loaded by the TypeScript config loader, but an internal one.

@webpro
Copy link
Collaborator

webpro commented Jan 29, 2024

🚀 This issue has been resolved in v4.2.2. See Release 4.2.2 for release notes.

@webpro webpro closed this as completed in fe3d17d Jan 29, 2024
@webpro
Copy link
Collaborator

webpro commented Jan 29, 2024

Oh well I was just cutting a release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants